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 =)
update:
"\n" =~ /\n.*\z/; # matches "\n" =~ /.*\z/; # doesn't match. huh? "\n" =~ /[^\n]*\z/; # matches. ??
|
|---|