Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by betterworld (Curate)
on May 21, 2007 at 12:25 UTC ( [id://616538]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -e 'print "there is no newline\n" if "foo\n" =~ /.*\z/'
    $ perl -e 'print "there is no newline\n" if "foo" =~ /.*\z/'
    there is no newline
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://616538]
Approved by tinita
Front-paged by almut
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-03-19 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found