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 で Characters and Strings についてさらに検索

製品

リリース

R2018a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by