regexprep with multiple expression
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
Is there a way to consolidate these regexprep into one expression? regexprep(ttxt, ' parish',''); regexprep(ttxt, ' borough',''); regexprep(ttxt, ' census area','');
ttxt is a cell array.
Thanks.
댓글 수: 0
답변 (2개)
Daniel Shub
2012년 8월 24일
Is this what you want?
ttxt = 'hello parish world borough foo census area bar';
regexprep(ttxt, ' parish| borough| census area','')
댓글 수: 0
Pete sherer
2012년 8월 24일
댓글 수: 1
Azzi Abdelmalek
2012년 8월 24일
this is not an answer. if you are satisfied, you have to click on "accept answer"
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!