You can proably use a negatively asserted look ahead: $str =~ m/$pattern(?!ab|cd)$morepattern/;. It is a zero-width pattern, but it might do what you want. It's about half-way through perlre.
-Paul
In reply to Re^3: RegEx: How to negate more than one character?
by jettero
in thread RegEx: How to negate more than one character?
by lokiloki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |