It claims zero or more prevalence of whitespace figures, followed by a comma and after that accompanied by zero or even more event of whitespace people. Even so x.replaceAll("\s+", ""); are going to be much more economical technique for trimming spaces (if string might have a number of contiguous spaces) https://stephendxocs.blogsumer.com/30774279/considerations-to-know-about-s