It says zero or even more incidence of whitespace people, accompanied by a comma then followed by zero or even more event of whitespace characters.Nonetheless x.replaceAll("s+", ""); is going to be additional economical technique for trimming Areas (if string may have several contiguous spaces) simply because of potentially less no of replacements