Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2020 07:02 AM
If you really must remove the colon and the backslash, you'll need to do it in two steps.
str.replace(':\', ''); fails because backslash escapes the second quote and creates a syntax issue.
str.replace(':\\', ''); // removes \, but not colon, so...
var v1 = str.replace(':', '');
var v2 = v1.replace('\\', '');