It states zero or even more incidence of whitespace figures, accompanied by a comma after which followed by zero or more occurrence of whitespace characters.Having said that x.replaceAll("s+", ""); will be much more efficient method of trimming spaces (if string may have numerous contiguous spaces) for the reason that of potentially a lot less no o