About s
It says zero or more event of whitespace figures, followed by a comma and then accompanied by zero or maybe more event of whitespace characters.
On the other hand x.replaceAll("s+", ""); will be much more effective method of trimming spaces (if string might have various contig