Regular expressions with regexp.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Anderson Oliveira
il 28 Set 2019
Commentato: Anderson Oliveira
il 28 Set 2019
I want to separate 8 number together like 20070101, <Year> 2007, <Month>01, <Day>01, how can I do?
0 Commenti
Risposta accettata
Stephen23
il 28 Set 2019
>> str = '20070101';
>> rgx = '(?<year>\d{4})(?<month>\d{2})(?<day>\d{2})';
>> out = regexp(str,rgx,'names')
out =
year: '2007'
month: '01'
day: '01'
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!