in reply to Re^5: Strange regex to test for newlines: /.*\z/
in thread Strange regex to test for newlines: /.*\z/
Obvious, I think."\n" =~ /\n.*\z/; # matches
If this one is obvious, then the original one should be obvious too. Compare:
"\n" =~ /\n.*\z/; # matches "\n" =~ /.*\z/; # should match but doesn't
The pattern gets shorter, but doesn't match any more...
|
|---|