I have string with file path. I want to replace all single backslashes ("") with double backslashes ("").
var replaceableString = "c:asdflkjklsdffjkl";
var part = /@""/g;
var filePath = replaceableString .replace(part, /@""/);
console.log(filePath);
Console showed me it.
c:asdlkjklsdfjkl
I found something like this, unfortunately it didn't work. Replacing with \
See Question&Answers more detail:os