E
E
Elnurhan2019-07-16 17:57:13
Java
Elnurhan, 2019-07-16 17:57:13

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("\\");

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-07-16
@Elnurhan

String[] prev = newPath.split("\\\\");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question