How to find specific text in a string?
Mostrar comentarios más antiguos
Hello,
I have the following text:
"abs(3).def(5).hhh(11)"
Is there an easy way for search for all the locations with "(" - number - ")".
I mean, all the places where there is a number between parenthesis.
I've try to use regexp but it was too complicate for me to understand how exactly it should be written.
Thanks.
1 comentario
Fangjun Jiang
el 4 de Abr. de 2022
regular expression makes you relax :)
Respuesta aceptada
Más respuestas (1)
Fangjun Jiang
el 4 de Abr. de 2022
0 votos
a="abs(3).def(5).hhh(11)";
regexp(a,'(\d+)')
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!