strrep for unordered string

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.

 采纳的回答

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

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

版本

R2018a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by