Remove parentheses with regexp
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Giorgos Papakonstantinou
el 14 de En. de 2014
Comentada: Giorgos Papakonstantinou
el 14 de En. de 2014
I have the following string:
a ='0.00 (578)';
How can I use regexp to retrieve what is inside the parentheses?
I have used this
regexp('0.00 (578)', '\S*\s', 'match')
but it gives me:
'0.00 '
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 14 de En. de 2014
Editada: Azzi Abdelmalek
el 14 de En. de 2014
a ='0.00 (578)';
regexp(a,'(?<=\()[\d.]+(?=\))','match')
Más respuestas (0)
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!