Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Having a problem with negative look behind assertion

by kcott (Abbot)
on Feb 12, 2013 at 14:10 UTC ( #1018373=note: print w/ replies, xml ) Need Help??


in reply to Having a problem with negative look behind assertion

G'day SirClive,

Another method is to simply skip lines starting with fee then test for [Bb]ar:

$ perl -Mstrict -Mwarnings -E ' my @data = qw{ foo/src/com/stuff/xxxxxx.java foo/src/com/stuff/ggbargg.java foo/src/com/stuff/ggBargg.java fee/src/com/stuff/ggbargg.java fee/src/com/stuff/ggBargg.java }; for (@data) { next if /^fee/; say if /[Bb]ar/; } ' foo/src/com/stuff/ggbargg.java foo/src/com/stuff/ggBargg.java

-- Ken


Comment on Re: Having a problem with negative look behind assertion
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018373]
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: (12)
As of 2014-09-17 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (70 votes), past polls