You can use a zero-width negative lookbehind assertion:
perl -le 'foreach (qw/housecat fatcat/) {print "$_ matches" if /(?<!house)cat/}'Cheers,
Ovid
New address of my CGI Course.
In reply to Re: excluding strings in regex
by Ovid
in thread excluding strings in regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |