Help with regexp to extract data
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pete sherer
am 3 Aug. 2021
Kommentiert: Pete sherer
am 3 Aug. 2021
Hi
I need help extracting the text and number or text before and after the "_". When an underscore is not present, then the whole text is considerd the latter part.
tdata= {'W1W','W1W 7','W1W 8','AZ_85262','CA_90032','CA_90045'};
the answer should be
fr = {'','','','AZ','CA','CA'}; % first portion
ed = {'W1W','W1W 7','W1W 8','85262','90032','90045'}; % the end portion
Thanks,
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Language Support 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!