#!/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; } }
In reply to Re^2: regexp exclude a string
by Murcia
in thread regexp exclude a string
by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |