Regex not operator

No, there’s no direct not operator. At least not the way you hope for. You can use a zero-width negative lookahead, however: The (?!…) part means “only match if the text following (hence: lookahead) this doesn’t (hence: negative) match this. But it doesn’t actually consume the characters it matches (hence: zero-width). There are actually 4 combinations of lookarounds with 2 axes: lookbehind / lookahead : … Read more