Here is my string, tel:\\99999999999
. Everytime I try to open it, it es with a single back slash like \99999999999
.
How do I remove both the back slashes so that the phone number bees 99999999999
?
Here is my string, tel:\\99999999999
. Everytime I try to open it, it es with a single back slash like \99999999999
.
How do I remove both the back slashes so that the phone number bees 99999999999
?
3 Answers
Reset to default 5var tel = 'tel:\\99999999999';
tel = tel.replace(/\\/g, '');
Here is a demo
Try:
var telString = telString.replace("tel:\\\\","");
I think this will help you
stringPath.replace(/^.*[\\\/]/, '')