[Edit]
+
0
-
0
js escape regex pattern characters
1 2 3const expression = /\.\*/g; // . escaped by \. and * escaped by \* console.log(expression.source); // '\\.\\*' <---- source returns string literals with changed \ to \\
1 2 3const expression = /\.\*/g; // . escaped by \. and * escaped by \* console.log(expression.source); // '\\.\\*' <---- source returns string literals with changed \ to \\