I am trying replace all white space of below string as blank
89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49
Desire output should be -
89504e470d0a1a0a0000000d49
I have tried with below code. But below code is not working.
public static void main(String[] args) {
String input = "89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49";
System.out.println(input);
input.replaceAll(" ", "").replaceAll("[\\s\\u00A0]+$", "");
input.replaceAll("\\w", "")
System.out.println(input);
}