From perlre:
(?!pattern)
A zero-width negative lookahead assertion. For example /foo(?!bar)/ matches any occurrence of ``foo'' that isn't followed by ``bar''. Note however that lookahead and lookbehind are NOT the same thing. You cannot use this for lookbehind.
Perhaps you mean to use the (?<!pattern) look behind assertion?
More From perlre:
(?<!pattern)
A zero-width negative lookbehind assertion. For example /(?<!bar)foo/ matches any occurrence of ``foo'' that isn't following ``bar''. Works only for fixed-width lookbehind.
-Ben Jacobs (dooberwah)
http://dooberwah.perlmonk.org
"one thing i can tell you is you got to be free"
In reply to (dooberwah) I'm don't think that gives the same results
by dooberwah
in thread Regular Expression Tweaking
by dooberwah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |