Since you did anchor your pattern to the end of the string, there is no need to make .* non greedy. To succeed the pattern-matcher must find a pattern of characters that extends all the way to the end of the string. Adding a ? only confuses the issue.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: The "anchor" misnomer in regexes
by CountZero
in thread The "anchor" misnomer in regexes
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |