It states zero or maybe more occurrence of whitespace characters, accompanied by a comma and afterwards accompanied by zero or even more event of whitespace characters.However x.replaceAll("s+", ""); will probably be a lot more successful technique for trimming Areas (if string may have several contiguous spaces) simply because of potentially much