As in. When explaining character classes, this tutorial explained why you cannot use a negated character class to match a q not followed by a u. To learn more, see our tips on writing great answers. Positive lookahead and lookbehind lead to shorter regexes, but you can do without them here. so I suppose it's because of positive lookbehind. As in, If there are insufficient characters before the current … That is, it allows to match a pattern only if there’s something before it. From docs.python: re:. Lookbehind. 2 Solutions. Negative lookbehind: (?