What does some symbol in regular express mean?
3 次查看(过去 30 天)
显示 更早的评论
x = [1 0.3 -2 0.001 -0.00016, 582398, 3020];
regexp(num2str(x), '(?<=(^|\s+)[\-\.0]*)[1-9](?=\d*\.?\d*)', 'match')
What does these symbol '<' '=' mean?
How this expression work, first do what, then do what?
0 个评论
采纳的回答
Rolfe Dlugy-Hegwer
2012-9-5
(?<=expr) - Look behind from current position and test if expr is found.
2 个评论
Oleg Komarov
2012-9-5
A small simplification (legit?)
regexp(num2str(x), '(?<=(^|\s+)[\-\.0]*)[1-9](?=[\d\.]*)', 'match')
更多回答(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!