regexp command expr(?!test) assertion fail
이전 댓글 표시
While using regexp command in following example :

I am expecting result to be 'Retiring' 'lovable' 'runtastic' but instead I am getting the following result:

Can someone please explain why is it so?
답변 (1개)
Walter Roberson
2020년 9월 19일
0 개 추천
Commencement matches \w* because it all word forming characters. It is followed by something that is not 'ment ' because the space after Commencement is not 'm'.
댓글 수: 3
Satyam Agrawal
2020년 9월 19일
madhan ravi
2020년 9월 19일
regexprep(str, '.*(ment)','')
Satyam Agrawal
2020년 9월 19일
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!