Skip invalid regular expression without breaking the parser