It claims zero or even more incidence of whitespace people, accompanied by a comma and then accompanied by zero or maybe more prevalence of whitespace people.Having said that x.replaceAll("s+", ""); will probably be a lot more successful strategy for trimming Areas (if string might have many contiguous Areas) mainly because of probably fewer no of