in reply to Re: "Complete match" regexes
in thread "Complete match" regexes

You might want to use the \z anchor instead of the $ anchor -- \z is explicit end-of-string, but $ can match right before a newline at the end of a string.

japhy -- Perl and Regex Hacker