I need only words when i split a string , while currently i am getting even spaces
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Prajwal Venkatesh
am 23 Jan. 2020
Kommentiert: Walter Roberson
am 24 Jan. 2020
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 Kommentare
Akzeptierte Antwort
Guillaume
am 23 Jan. 2020
Probably the easiest is to do:
string2 = regexp(yourstring, '\w+', 'match')
10 Kommentare
Walter Roberson
am 24 Jan. 2020
string2 comes out as missing in that file, and there is no way that that result variable is the output of that regexp() command.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!