from forward How to remove the backslash in string using regex in Java?


1 Answers

You can simply use String.replaceAll()

 String foo = "hai how are\\ you?";
 String bar = foo.replaceAll("\\\\", "");
remove backslash from json string java

How to remove the backslash in string using regex in Java?

For example:

hai how are\ you?

I want only:

hai how are you?


Related


Tags

java   regex