Remove parentheses with regexp
조회 수: 14 (최근 30일)
이전 댓글 표시
Giorgos Papakonstantinou
2014년 1월 14일
댓글: Giorgos Papakonstantinou
2014년 1월 14일
I have the following string:
a ='0.00 (578)';
How can I use regexp to retrieve what is inside the parentheses?
I have used this
regexp('0.00 (578)', '\S*\s', 'match')
but it gives me:
'0.00 '
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2014년 1월 14일
편집: Azzi Abdelmalek
2014년 1월 14일
a ='0.00 (578)';
regexp(a,'(?<=\()[\d.]+(?=\))','match')
추가 답변 (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!