Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Strange regex to test for newlines: /.*\z/

by tinita (Parson)
on May 21, 2007 at 12:33 UTC ( [id://616542]=note: print w/replies, xml ) Need Help??


in reply to Re: Strange regex to test for newlines: /.*\z/
in thread Strange regex to test for newlines: /.*\z/

It works because . does not match newlines by default.
i think betterworld knows this =)
the point is, should .* match the empty string between foo\n and the end?

update:

"\n" =~ /\n.*\z/; # matches "\n" =~ /.*\z/; # doesn't match. huh? "\n" =~ /[^\n]*\z/; # matches. ??

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://616542]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found