Right and right.
I don't understand why people expect non-greedy matching to actually mean "globally shortest match". Perhaps it's in the language we use. Just keep the left-to-rightness as the most prominent feature of your mental model of how perl's RE engine works and you shouldn't go wrong though.
In reply to Re^3: Why is this regex greedy?
by duff
in thread Why is this regex greedy?
by pbeckingham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |