regex: Fix control flow in the parser
regex: Escaped literals can end ranges
regex: The first range in a character class can start with a left bracket