Next | Regular Expression Mastery | 27 |
What's the opposite of `greedy'? (`Monastic'?)
a+?b is just like a+b
Except it tries the arrows in the other order
/a+?b/
aaab
Notice more backtracking
Usually less efficient
That's why the `normal' one is greedy
Next | Copyright © 2002 M. J. Dominus |