I have the string: \\rnosapmdwq\\salesforce\\R3Q\\OutputFiles\\Archive
I\'m getting a unrecognized escape sequence when I try to send this to a .NET web service.
The correct syntax would be: Path = Path.replace(/\\/g, "|");
Working example at: http://jsfiddle.net/eDKej/.
Example (extra code for demonstration purposes only):
var Path = $("#path").text();
Path = Path.replace(/\\/g, "|");
$("#new-path").append(Path);
You don't need to make a regex a string, and it helps having that first /
in there
Path = Path.replace(/\\/g, "|")