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.

 Respuesta aceptada

Bhaskar R
Bhaskar R el 5 de Feb. de 2020

0 votos

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

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2018a

Etiquetas

Preguntada:

el 5 de Feb. de 2020

Comentada:

el 5 de Feb. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by