The 's' replaces a person Place match at a time though the 's+' replaces The full space sequence at the same time with the second parameter. Having said that x.replaceAll("\s+", ""); are going to be additional productive way of trimming Areas (if string may have a number of contiguous spaces) https://stephenxoesh.bloggazza.com/30575983/not-known-details-about-mantra-mushroom-chocolate-bars