Please help with Regular Expression ..
조회 수: 13 (최근 30일)
이전 댓글 표시
Help please
str = '<black><black>shoes'
ans = regexp(str,'.*?','match','ignorecase');
what ans i want is:
'shoes'
but instead i got this:
'<black><black>shoes'
how can i regexp that ?
댓글 수: 0
채택된 답변
Vishal Rane
2012년 11월 30일
Change the pattern to '<black>\w+</black>'.
댓글 수: 2
Vishal Rane
2012년 11월 30일
The same command still works, although output is a 1x2 cell array. Use transpose operator ' to get a 2x1 output.
추가 답변 (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!