Remove a string from another string
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
Ezma Nasr
il 15 Feb 2023
0 voti
str='bio-inspired';
newStr = erase(str,"-")
Categorie
Scopri di più su Characters and Strings in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!