Ok, now I get it:
var strFind = "\\s*" + MYSIGN + "\\s*";
orgDoc.findReplace.replace(strFind, " " + MYSIGN + " ");
this invalidates my trick because you cannot use variables in assignments of Regexp object like:
var myRegexp = /\s*=\s*/;
You could write the following:
var myRegexp = new RegExp ("\\s*"+ MYSIGN +"\\s*");
but then lose the whole point of getting around escaping backslashes. This way you might as well keep on working with "ordinary" strings.



