Test, validate and match regular expressions
Matches entire lines that do NOT contain the substrings 'ab' or 'cd' anywhere. It consumes one character at a time, using a negative lookahead at each position to verify neither forbidden sequence begins there before matching the character. This 'tempered dot' technique is the standard way to negate substrings in regex, useful for filtering input or validating strings that must exclude specific sequences.