Understanding positive and negative lookaheads
Lookaheads do not consume any characters. It just checks if the lookahead can be matched or not: a(?!b)c So here after matching a it just checks if it is followed not by b but does not consume that not character (which is c) and is followed by c. How a(?!b)c matches ac ac | a … Read more