strrep for unordered string

1 vue (au cours des 30 derniers jours)
Reuben Addison
Reuben Addison le 5 Fév 2020
Commenté : Stephen23 le 5 Fév 2020
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
What about reguler expression?
result = regexprep('Z06IL202RNP302', '(Z|IL|RNP)', '');

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by