i have a string like the following
var string1 = " folder\\subfolder1\\subfolder2 "
and i want to replace the “\” with “/” with string1.replace in order to be
var string2 = "folder/subfolder1/subfolder2"
I tried
var rep = path.replace("\\", "/");
but is not working. Any help ?
You need to do it globally, for example with a regexp literal & the
gflag;