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

Re: regular expression: match multiple newlines

by Lennotoecom (Pilgrim)
on Nov 04, 2013 at 01:22 UTC ( #1061088=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    /(?<=\S)\s*$/ ? ({print "$a$`"},$a="\n") : ($a='EEEEE') while <DATA>;
    
    ...
    
    fish2
    text3 
    
  2. or download this
    dogs rats
    catsEEEEEfish
    text
    cats2EEEEEfish2
    text3
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-09-01 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls