Problem with a string .
显示 更早的评论
Hello here is my string :
'abc "abc" '
I need to throw out single quotation mark and replace double quotation mark to single quotation mark so the output will be :
abc 'abc'
How to do it ?
Thanks a lot.
采纳的回答
更多回答(1 个)
Sean de Wolski
2013-9-17
doc strrep
Here it is:
str = '''abc "abc" '''
str2 = strrep(strrep(str,'''',''),'"','''')
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!