Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by mrpeabody (Friar)
on May 22, 2007 at 20:37 UTC ( #616861=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616861]
help
Chatterbox?
[LanX]: did you even go to the Dutch Perl Workshop in Utrecht?
[erix]: haha ok. I'm going to Glasgow though, and make a long road trip round the isles
[erix]: [Lanx} not the last time but the one before (there have been two)
[LanX]: when did you move to Utrecht, you used to live in a windmill on a dyke walking around in wooden shoes. ..
[LanX]: ... did you lie to me? OO
erix wouldn't mind a nice old windmill to live in... Mueller/Miller/ Molenaar

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2017-12-15 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (439 votes). Check out past polls.

    Notices?