I recommend reading perlrequick and perlretut to gather some insight on how regular expressions work.
Nevertheless, here's a possible implementation:
yieldsmy $re = qr/(?:a|b)h/; print 'abcdef' !~ $re; print 'ahcdef' !~ $re; print 'abbhef !~ $re;
1 (0) (0)
In reply to Re: RegEx: How to negate more than one character?
by shigetsu
in thread RegEx: How to negate more than one character?
by lokiloki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |