How to find specific text in a string?
Show older comments
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 Comment
Fangjun Jiang
on 4 Apr 2022
regular expression makes you relax :)
Accepted Answer
More Answers (1)
Fangjun Jiang
on 4 Apr 2022
0 votes
a="abs(3).def(5).hhh(11)";
regexp(a,'(\d+)')
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!