How to use regexp for the following?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Prajwal Venkatesh
am 20 Jan. 2020
Beantwortet: Guillaume
am 20 Jan. 2020
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)
0 Kommentare
Akzeptierte Antwort
Guillaume
am 20 Jan. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu String Parsing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!