in reply to Re: regexp exclude a string
in thread regexp exclude a string
#!/usr/bin/perl FILE: for my $file (glob '*.txt') { open my $fh, '<', $file or die "$file: D'Oh! $!\n"; while (<$fh>) { /(?=^(?:(?!green red blue).)*$).*?(green|red|blue)/i; do { print "$file \n"; next FILE; } if $1; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: regexp exclude a string
by blazar (Canon) on Jan 19, 2006 at 14:56 UTC |