MATLAB Answers

tqy
1

What does some symbol in regular express mean?

Asked by tqy
on 5 Sep 2012
Latest activity Commented on by Walter Roberson
on 28 Feb 2015
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 Comments

Sign in to comment.

1 Answer

Answer by Rolfe Dlugy-Hegwer on 5 Sep 2012
 Accepted Answer

(?<=expr) - Look behind from current position and test if expr is found.

  2 Comments

A small simplification (legit?)
regexp(num2str(x), '(?<=(^|\s+)[\-\.0]*)[1-9](?=[\d\.]*)', 'match')

Sign in to comment.