I
indi
I've spent the last two hours trying every other solution listed, to
no avail: this works, so I'm sharing it for the other folks who
couldn't find a solution other than switching to another language.
var fileString = "\\mydev\folder\folder2\folder3\file.txt";
var myPat = /%5C/g; //this is using regular expression to
define the escaped version of a backslash
fileString = escape(fileString);
fileString = fileString.replace(myPat,"%5C%5C");
fileString = unescape(fileString);
fileString now equals "\\\\mydev\\folder\\folder2\\folder3\
\file.txt"
Hope this keeps someone else from pounding their heads against the
monitor. Enjoy!
no avail: this works, so I'm sharing it for the other folks who
couldn't find a solution other than switching to another language.
var fileString = "\\mydev\folder\folder2\folder3\file.txt";
var myPat = /%5C/g; //this is using regular expression to
define the escaped version of a backslash
fileString = escape(fileString);
fileString = fileString.replace(myPat,"%5C%5C");
fileString = unescape(fileString);
fileString now equals "\\\\mydev\\folder\\folder2\\folder3\
\file.txt"
Hope this keeps someone else from pounding their heads against the
monitor. Enjoy!