0
我试图用函数regexprep
替换字符串中的元音与另一个字符。例如,在Matlab中使用regexprep替换字符
content = regexprep('refrigerator', '[aeiou]', '!')
content = r!fr!g!r!t!r
然而,当我试图代替字符数组的使用一个字符串变量,它似乎不工作:
allowedChar = 'aeiou';
content = regexprep('refrigerator', allowedChar, '!')
content = refrigerator
我该如何解决这个问题?
是啊,那是相当多了! – rayryeng 2015-02-09 08:22:45