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.

 채택된 답변

Bhaskar R
Bhaskar R 2020년 2월 5일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2020년 2월 5일

댓글:

2020년 2월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by