I\'m not very sure there is any regex to replace thoese things:
This is a string value read from a xml file saved through Linux machine
str = str.replaceAll("\\\\|/", "\\"+System.getProperty("file.separator"))