.* will match anything but a newline, or the empty string.
It will match both of those, actually, as it should.
506 $ perl -we'print "yes" if "" =~ /.*/' yes 507 $ perl -we'print "yes" if "\n" =~ /.*/' yes
In reply to Re^4: Strange regex to test for newlines: /.*\z/
by mrpeabody
in thread Strange regex to test for newlines: /.*\z/
by betterworld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |