Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: regular expression: match multiple newlines

by Lennotoecom (Monk)
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 chilling in the Monastery: (3)
As of 2014-07-13 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (247 votes), past polls