Variable fileLocation may get two kinds of strings
"N:\LDWG\PDF\2002P48.pdf"
"\\Gis1\GIS\LDWG\Pdf\2007P69.pdf"
I just want result to be like
"N:/LDWG/PDF/2002P48.pdf"
"//Gis1/GIS/LDWG/Pdf/2007P69.pdf"
respectively
Tried
fileLocation.replace(/\\/g,"/")
str.replace("\\", "/")
But didn't work.
Note: There is a double slash in 2nd string