How to use regexp for the following?

4 visualizaciones (últimos 30 días)
Prajwal Venkatesh
Prajwal Venkatesh el 20 de En. de 2020
Respondida: Guillaume el 20 de En. de 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)

Respuesta aceptada

Guillaume
Guillaume el 20 de En. de 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.

Más respuestas (0)

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by