It says zero or maybe more occurrence of whitespace people, accompanied by a comma and then followed by zero or maybe more prevalence of whitespace people.Having said that x.replaceAll("s+", ""); will be much more productive means of trimming spaces (if string can have multiple contiguous Areas) mainly because of probably fewer no of replacements o