If .+? were to match any less, $ wouldn't match.
I'm sorry, but I don't understand why .+? doesn't match 2 characters at position 5 - the match has to be tied to the end of the string...doesn't it?
In reply to Re^2: Non-greedy substitution
by Bod
in thread Non-greedy substitution
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |