Regular expression negative lookahead
A negative lookahead says, at this position, the following regex can not match. Let’s take a simplified example: a(?!b(?!c)) a Match: (?!b) succeeds ac Match: (?!b) succeeds ab No match: (?!b(?!c)) fails abe No match: (?!b(?!c)) fails abc Match: (?!b(?!c)) succeeds The last example is a double negation: it allows b followed by c. The … Read more