Regular expressions with regexp.
14 ビュー (過去 30 日間)
古いコメントを表示
I want to separate 8 number together like 20070101, <Year> 2007, <Month>01, <Day>01, how can I do?
0 件のコメント
採用された回答
Stephen23
2019 年 9 月 28 日
>> str = '20070101';
>> rgx = '(?<year>\d{4})(?<month>\d{2})(?<day>\d{2})';
>> out = regexp(str,rgx,'names')
out =
year: '2007'
month: '01'
day: '01'
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!