Removing multiple substrings in a string
Ältere Kommentare anzeigen
I have a string like this
String = 'AAAAAAAAAbbbbbbbbbbbbbbbbCCCCCCCCCCCCCCCCCddddddddddddddddddEEEEEEEEEEEE';
% I want to remove all the lowercase letters so I need some indexes to do it
[Start,End]=regexp(String,'[a-z]{1,}');
%Here it comes the problem
I do not know how to remove multiple substring from the same string. eraseBetween provide a way to index a substring but how to remove multiple ones?
Thank you in advance
Akzeptierte Antwort
Weitere Antworten (1)
madhan ravi
am 20 Jul. 2020
regexprep(String, '[a-z]*', '')
4 Kommentare
Andrea Cappannini
am 20 Jul. 2020
madhan ravi
am 20 Jul. 2020
Why touch your nose around the head instead of touching it directly?
Andrea Cappannini
am 20 Jul. 2020
madhan ravi
am 20 Jul. 2020
You’re a funny guy xD.
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!