It states zero or more occurrence of whitespace people, followed by a comma then followed by zero or even more occurrence of whitespace people. On the other hand x.replaceAll("\s+", ""); are going to be additional productive way of trimming Areas (if string can have many contiguous spaces) for the reason https://mantra-bars-euphoria-bar00864.blogofoto.com/62581896/everything-about-s