I'm trying to replace backslashes with forward slashes in javascript with the replace function and regex but can't get it to work. Thought it would be the following but it doesn't work:
path.replace("/\\/g", "//")
If I had a path that looks like D:\Games\Scrolls\ what would the regex be to replace to D:/Games/Scrolls/?
path.replace(/\\/g, "/")- note also the replacement string should be"/"not"//".