Please help with Regular Expression ..
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Help please
str = '<black><black>shoes'
ans = regexp(str,'.*?','match','ignorecase');
what ans i want is:
'shoes'
but instead i got this:
'<black><black>shoes'
how can i regexp that ?
0 Kommentare
Akzeptierte Antwort
Vishal Rane
am 30 Nov. 2012
Change the pattern to '<black>\w+</black>'.
2 Kommentare
Vishal Rane
am 30 Nov. 2012
The same command still works, although output is a 1x2 cell array. Use transpose operator ' to get a 2x1 output.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings 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!