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에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!