Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: realizing AND in regex?

by pvaldes (Chaplain)
on Sep 13, 2012 at 22:39 UTC ( #993594=note: print w/ replies, xml ) Need Help??


in reply to realizing AND in regex?

I got the requirement to find fields which match multiple regex at the same time

while (<DATA>){ if (/foo/ && /bar/){ print $_ } } __DATA__ fobur barfoo foobar fobar bar foo


Comment on Re: realizing AND in regex?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-28 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls