Remove parentheses with regexp
18 ビュー (過去 30 日間)
古いコメントを表示
Giorgos Papakonstantinou
2014 年 1 月 14 日
コメント済み: Giorgos Papakonstantinou
2014 年 1 月 14 日
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 件のコメント
採用された回答
Azzi Abdelmalek
2014 年 1 月 14 日
編集済み: Azzi Abdelmalek
2014 年 1 月 14 日
a ='0.00 (578)';
regexp(a,'(?<=\()[\d.]+(?=\))','match')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!