How to find specific text in a string?
古いコメントを表示
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 件のコメント
Fangjun Jiang
2022 年 4 月 4 日
regular expression makes you relax :)
採用された回答
その他の回答 (1 件)
Fangjun Jiang
2022 年 4 月 4 日
0 投票
a="abs(3).def(5).hhh(11)";
regexp(a,'(\d+)')
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!