I don't think that that solution gives the same results.
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:
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)
"one thing i can tell you is you got to be free"