i want to replace escape character(\)in the path to single \ in js
\\cpmp1\D$\\ABC\\XYZ
i tried
console.log(s.replace(/.\\\\/g, '\\'));
but it does not do any replace ?Any ideas ?
var replacedStr = s.replace(/\\+/g, '\\');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With