regexp qwestion
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone
i have an exprecion of the type numstrscheck = regexp(TheString, '-?\d+\.?\d*', 'match');
is there a way that alongside with any other operations that are done inside regexp, to also substitute the letter s of 'TheString' if it has any, with the number one?
0 件のコメント
採用された回答
Andrei Bobrov
2011 年 12 月 2 日
TheString = 'gftr dsrew mkjghfdfsde'
out = regexprep(TheString,'s','1')
その他の回答 (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!