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
In reply to Re: Having a problem with negative look behind assertion
by kcott
in thread Having a problem with negative look behind assertion
by SirClive
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |