Removing backslashes in a string
Here is my string, tel:\\99999999999. Everytime I try to open it, it comes with a single back slash like \99999999999.
How do I remove both the back slashes so that the 开发者_如何学Pythonphone number becomes 99999999999?
var 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(/^.*[\\\/]/, '')
加载中,请稍侯......
精彩评论