Find the string from the cell array
1 回表示 (過去 30 日間)
古いコメントを表示
Gopalakrishnan venkatesan
2015 年 8 月 12 日
編集済み: Azzi Abdelmalek
2015 年 8 月 12 日
I have a cell array containg a = {'s_ddfa_af' ; 'adfa' ; 'f_dsfa_dasf_sdf'; 'asdf_dd'};
I need to extract the string starting with 's'
When I use regular expression regexpi( a , 's(\w*)' ,'match')
I am getting as {'s_ddfa_af' ; [] ; 'sfa_dasf_sdf' ; 'sdf_dd'}
but i need only the string starting with 's'
How can i do this??
Thanks a lot
0 件のコメント
採用された回答
Azzi Abdelmalek
2015 年 8 月 12 日
編集済み: Azzi Abdelmalek
2015 年 8 月 12 日
a = {'s_ddfa_af' ; 'adfa' ; 'f_dsfa_dasf_sdf'; 'asdf_dd'};
out=regexpi(a,'^s\w*','match')
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!