A similar thread with answers that should also be helpful to you: help with lazy matching. It's also important to remember that the regex engine will always match as early as possible (left to right).
In reply to Re: Pattern matching: Lazy vs. greedy
by Anonymous Monk
in thread Pattern matching: Lazy vs. greedy
by false_friend
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |