in reply to Re^2: Strange regex to test for newlines: /.*\z/
in thread Strange regex to test for newlines: /.*\z/
Fair enough, but try:
There definitely appears to be a bug here, but it may be that the above snippet should not match, rather than the version with .* matching.
AFAIK, .* and .{0,} should be exactly equivilent, but when combined with /z they are not, if the string ends in a newline.perl -e 'print "match\n" if "foo\n" =~ /.{0,}\z/'
There definitely appears to be a bug here, but it may be that the above snippet should not match, rather than the version with .* matching.
In Section
Seekers of Perl Wisdom