in reply to Re: Strange regex to test for newlines: /.*\z/
in thread Strange regex to test for newlines: /.*\z/

It works because . does not match newlines by default.
i think betterworld knows this =)
the point is, should .* match the empty string between foo\n and the end?

update:

"\n" =~ /\n.*\z/; # matches "\n" =~ /.*\z/; # doesn't match. huh? "\n" =~ /[^\n]*\z/; # matches. ??