MATLAB: Strrep for unordered string

MATLABstrrep

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.

Best Answer

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