Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: grep question using multiple lines

by skx (Parson)
on Dec 28, 2008 at 12:53 UTC ( #732883=note: print w/replies, xml ) Need Help??


in reply to Re^2: grep question using multiple lines
in thread grep question using multiple lines

Indeed your match is greedy. Still we can change it as follows:

$ perl -nle 'print $1 while /constant=(^ +)\s/g' < test.txt
barney@gmail.com
wilma@aol.com
Steve
--
  • Comment on Re^3: grep question using multiple lines

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2016-09-29 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (552 votes). Check out past polls.