I have a string 'Z06IL202RNP302' I want to take out 'Z', 'IL' and 'RNP', how do I use strrep to achieve that. Do I do it multiple times.

 Réponse acceptée

Bhaskar R
Bhaskar R le 5 Fév 2020

0 votes

What about reguler expression?
result = regexprep('Z06IL202RNP302', '(Z|IL|RNP)', '');

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Produits

Version

R2018a

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by