Firefox error: Unable to check input because the pattern is not a valid regexp: invalid identity escape in regular expression
问题 I'm using regex pattern matching for HTML5 form validation. The latest version of Firefox gives me an error. I only started seeing this in Firefox 46. I don't think this was a problem in earlier Firefox versions. Unable to check <input pattern='[\@\%]'> because the pattern is not a valid regexp: invalid identity escape in regular expression Caused by this very simple test case: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <form> <input pattern="[\@\%]"> </form> </html> Why is