59
rated 0 times
[
65]
[
6]
/ answers: 1 / hits: 153801
/ 12 Years ago, tue, may 1, 2012, 12:00:00
Those two regex act the same way:
var str = 43gf\..--.65;
console.log(str.replace(/[^d.-]/g, ));
console.log(str.replace(/[^d.-]/g, ));
In the first regex I don't escape the dot(.
) while in the second regex I do(.
).
What are the differences? Why is the result the same?
More From » regex