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...
In reply to Re^6: Strange regex to test for newlines: /.*\z/
by betterworld
in thread Strange regex to test for newlines: /.*\z/
by betterworld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |