Replace repeated symbol by regexprep
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sergei Zhuravlev
am 23 Nov. 2017
Beantwortet: Walter Roberson
am 23 Nov. 2017
Hello, dear Matlab experts, I'd like to change i.e. string '1,31,' to '1,31' by using regexprep. So I need to replace second, third and others commas (or to keep only the first one). There is a plenty of characters and quantifiers for using in expression but I can not find one appropriate. I.e. I use
regexprep ('1,31,',',[1]',',')
but nothing changes.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!