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

Re^3: matching first paragraph satisfying condition

by mnshptl32 (Initiate)
on Aug 20, 2019 at 18:07 UTC ( #11104752=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -0pe 's/(.*?\n*?([^ \n].*?)\n\n.*|.*?\n([^ \n].*?)\n\n.*)/$1/gs' 
    +file.txt
    
  2. or download this
    perl -0pe 's/(?|.*?\n*?([^ \n].*?)\n\n.*|.*?\n([^ \n].*?)\n\n.*)/$1/gs
    +' file.txt
    
  3. or download this
    perl -0pe 's/.*?\n([^ \n].*?)\n\n.*/$1/gs' file.txt
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2019-12-14 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?