Everything about s
It suggests zero or even more incidence of whitespace characters, followed by a comma after which you can followed by zero or even more event of whitespace characters.However x.replaceAll("s+", ""); will probably be a lot more successful strategy for trimming spaces (if string can have several contiguous spaces) because of potentially much less no