Replacing illegal character in fileName
In Java, I've a File-Name-String. There I want to replace all illegal Characters with '_', but not , , , and a-z0-9-._
I tried following code: But this did not worked!
myString = myString.replaceAll("[\\W][^\\.][^-][^_]", "_");