the $ is not inside your $1 group, so why should \n be included in the second print?
anyway $ is a zero-length assertion
never mind, fletch already gave the perfect answer.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Non-greedy match end of line bug?
by LanX
in thread Non-greedy match end of line bug?
by am12345
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |