Categories
How to split a string on a backslash?
So, you need to split the string into an array on the backslash. This option doesn't work:String[] prev = newPath.split("\\");
String[] prev = newPath.split("\\");
Answer the question
In order to leave comments, you need to log in
String[] prev = newPath.split("\\\\");
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question