Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Regular expression question strikes again

by sgt (Deacon)
on Sep 05, 2007 at 09:47 UTC ( #637102=note: print w/replies, xml ) Need Help??

in reply to Regular expression question strikes again

probably you just need Corion's solution, but be careful when you mix positive and negative logic. Imagine you have qr{^Remote.*$} and qr{^.*tmp$} You might want to process all Remote files that don't end in tmp.

Maybe it's better to have a two-pass (or n-pass) filter, with a first pass using positive logic and a second pass using negative logic, for instance. The point is that you use the same rules in any pass.

So you use positive logic labels, and your filter decides if it wants to grep or 'grep { not ...}'

cheers --stephan
  • Comment on Re: Regular expression question strikes again

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2023-10-04 23:29 GMT
Find Nodes?
    Voting Booth?

    No recent polls found