I have a newbie question about replaceAll method on String. It works fine as long as the input does not contain any type of space (breaking/non-breaking etc).
How to sanitize the input so it covers all cases for special space characters and I can use something like this:
String replaced = replaced.replaceAll("my-test (2)", "test"); // not working
I tried various types of regex with \\s, \u00A0 etc.
EDIT: I noticed that the braces are also causing some problems with replaceAll.
This is my case:
"my-value (2)".replaceAll("my-value (2)", "test);
my-test (2)?