JAVA replace string
October 28, 2008
Leave a comment
Replaces each substring of this string that matches the given regular expression with the given replacement.
String s = “This is a string”;
s = s.replaceAll(” “,”");s now equals “Thisisastring”
All white spaces have been replaced with the empty string.

