I have the following string:
var foo = "{(y-7)}({x + d})"
var find = "{(y-7)}";
var replacement = "12";
var re = new RegExp(find, 'g');
foo = foo.replace(re, replacement);
But this results in the exact same string, without any changes. But, if I remove the parens i.e "(" and ")" from the expression, then it seems to work. Why
Why won't it match when the expressions contain "("?