Question:
After upgrading from Angular 10 to 12, and AJV 6.x to 8.x, I’m getting an “invalid escape” error:Invalid regular expression: /\{.*\:\{.*\:.*\}\}/: Invalid escape
The regex that is causing the error is the “pattern” property of the dateFormats object defined below:
Answer:
:
has no special meaning in regular expressions, it doesn’t need to be escaped.If you have better answer, please add a comment about this, thank you!