c:\@Work\Perl\monks>perl -wMstrict -le "my $pattern = qr{ \b f[eio]e \b }xms; ;; my $str = 'foo bar feeble macfee unfeeling fee fumble'; ;; print qq{match: '$1'} if $str =~ m{ (bar (?: (?! $pattern) .)* f \w+) }xms; " match: 'bar feeble macfee unfeeling fee' #### c:\@Work\Perl\monks>perl -wMstrict -le "my $giant_sez = qr{ \b f[eio]e \b }xms; my $not_giant = qr{ (?! $giant_sez) . }xms; ;; my $str = 'foo bar feeble macfee unfeeling fee fumble'; ;; print qq{match: '$1'} if $str =~ m{ (bar $not_giant* f \w+) }xms; " match: 'bar feeble macfee unfeeling fee'