regexprep with multiple expression

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.

Risposte (2)

Is this what you want?
ttxt = 'hello parish world borough foo census area bar';
regexprep(ttxt, ' parish| borough| census area','')
Pete sherer
Pete sherer il 24 Ago 2012

0 voti

Yes. Thanks

1 Commento

this is not an answer. if you are satisfied, you have to click on "accept answer"

Accedi per commentare.

Categorie

Scopri di più su App Building in Centro assistenza e File Exchange

Tag

Richiesto:

il 24 Ago 2012

Community Treasure Hunt

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

Start Hunting!

Translated by