필터 지우기
필터 지우기

regexprep with multiple expression

조회 수: 10 (최근 30일)
Pete sherer
Pete sherer 2012년 8월 24일
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.

답변 (2개)

Daniel Shub
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','')

Pete sherer
Pete sherer 2012년 8월 24일
Yes. Thanks
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 24일
this is not an answer. if you are satisfied, you have to click on "accept answer"

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by