Please help with Regular Expression ..
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Vishal Rane
2012-11-30
Change the pattern to '<black>\w+</black>'.
2 个评论
Vishal Rane
2012-11-30
The same command still works, although output is a 1x2 cell array. Use transpose operator ' to get a 2x1 output.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!