例: 'Hello, world!'から記号を取り除き、'Helloworld'を返す
regexprep - 正規表現により文字列を置換
構文
s = regexprep('str', 'expr', 'repstr')
s = regexprep('str', 'expr', 'repstr', options)
http://www.mathworks.co.jp/help/ja_JP/techdoc/ref/regexprep.html
で
out = regexprep('Hello,World', ',', '')
で希望の結果になりませんか。
コメント(0件)