regexp qwestion

1 回表示 (過去 30 日間)
Raldi
Raldi 2011 年 12 月 2 日
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?

採用された回答

Andrei Bobrov
Andrei Bobrov 2011 年 12 月 2 日
TheString = 'gftr dsrew mkjghfdfsde'
out = regexprep(TheString,'s','1')
  1 件のコメント
Raldi
Raldi 2011 年 12 月 2 日
Thanks Andrei

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by