I need only words when i split a string , while currently i am getting even spaces
1 回表示 (過去 30 日間)
古いコメントを表示
string2=split(string(result{1,hh}(ss,1)),[" ",",","(",")","-"])
>> string2
string2 =
8×1 string array
"Secure"
"VPDM"
"to"
"Ebay"
"housing"
""
"optional"
""
I need the output to be
"Secure"
"VPDM"
"to"
"Ebay"
"housing"
"optional"
0 件のコメント
採用された回答
Guillaume
2020 年 1 月 23 日
Probably the easiest is to do:
string2 = regexp(yourstring, '\w+', 'match')
10 件のコメント
Walter Roberson
2020 年 1 月 24 日
string2 comes out as missing in that file, and there is no way that that result variable is the output of that regexp() command.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!