Extract single-digit and double-digit numbers at the same time from a cell array with "regexp"
Mostra commenti meno recenti
Hi, I am trying to extract the numbers from the following cell array:
a={'1','3','6-10','11-20'};
If I use regexp, the number 10, 11 and 20 are also split:
b=regexp(a,'[0-9]','match');
b{:}
I would like to have the number 10, 11 and 20 unsplitted. How to do it, maybe still with regexp?
2 Commenti
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Data Type Conversion 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!