Find indexes of strings that have special characters.
1 回表示 (過去 30 日間)
古いコメントを表示
I have column that consist of strings
eg.
someString
String
otherString
someString
String
and I want to get idexes of strings that have word 'some' or 'other' inside it.
so the result of the function will be [1,3,4].
0 件のコメント
採用された回答
Andrei Bobrov
2013 年 9 月 16 日
a = {'someString';'String';'otherString';'someString';'String'};
out = find(~cellfun('isempty',regexpi(a,'some|other')));
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!