replace one word with another one in a string
이전 댓글 표시
Hi guys
I'd like to replace one word with another one in a string. For example:
s = 'C:\myproject\data\background\view1\rgb'; I'd like to replace "background" with "hello"
Is there any function can do this?
Thanks in advanced
답변 (1개)
Fangjun Jiang
2011년 9월 20일
0 개 추천
strrep(s,'background','hello');
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!