How to use regexp for the following?

1 回表示 (過去 30 日間)
Prajwal Venkatesh
Prajwal Venkatesh 2020 年 1 月 20 日
回答済み: Guillaume 2020 年 1 月 20 日
I want to use regexp for the following string 'ME5708' ,
S[lower( 'o the first two characters should be uppercase alphabets and the next four characters should be numbers')]
(don't shout--dpb)

採用された回答

Guillaume
Guillaume 2020 年 1 月 20 日
If you want to extract two uppercase letters followed by four digit:
regexp(yourinput, '[A-Z]{2}\d{4}', 'match')
I recommend that you try to learn regular expression. This particular expression is very simple.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by