Borrar filtros
Borrar filtros

Exclude Digits from String using Regexp in MATLAB

13 visualizaciones (últimos 30 días)
Konark Kelaiya
Konark Kelaiya el 27 de Ag. de 2014
Editada: Andrei Bobrov el 27 de Ag. de 2014
Need to exclude Numbers from String and returns cell arrays of strings in MATLAB
e.g str = 'abc76.5_pol0.00_Ev0.3'
output {'abc','pol','Ev'}

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 27 de Ag. de 2014
Editada: Andrei Bobrov el 27 de Ag. de 2014
regexp(str,'[^\d_\.]*','match')
or
regexp(str,'[a-zA-Z]*','match')

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