Remove a string from another string
이전 댓글 표시
I have two strings like 'bio-inspired' and 'bioinspired'. I want to essentially subtract one string from another and get '-' in the end. How can I delete all letters appearing in one string from another string? The erase function doesn't work for this case.
채택된 답변
추가 답변 (1개)
Ezma Nasr
2023년 2월 15일
0 개 추천
str='bio-inspired';
newStr = erase(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!