• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Invalid regular expression: invalid escape

Resolved: Invalid regular expression: invalid escape

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

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:
How can I fix this regex?

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!

ajv regex
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Java Virtual Machines deleted

27/03/2023

Resolved: PyCharm cannot see my newly compiled .pyc see on import

27/03/2023

Resolved: I am facing ERR_HTTP2_PROTOCOL_ERROR on my website

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.