in reply to Re^3: Strange regex to test for newlines: /.*\z/
in thread Strange regex to test for newlines: /.*\z/
.* 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 Section
Seekers of Perl Wisdom