Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by Mutant (Priest)
on May 21, 2007 at 14:02 UTC ( #616565=note: print w/ replies, xml ) Need Help??


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

One problem tho, the following all match the string "\n":

/.*/ /\z/ /.{0}\z/
It's possible that \z is meant to introduce some specialness when combined with .* (or possibly some other quantifiers), but I haven't seen it mentioned in any docs. This is either a bug, or a very poorly documented feature.


Comment on Re^3: Strange regex to test for newlines: /.*\z/
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2014-09-21 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls