There is no good general way to negate a (Perl) regular expression.
See my answer.
In reply to Re^2: Invert grep match with qr// variable
by ikegami
in thread Invert grep match with qr// variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |