The 's' replaces a single space match at any given time nevertheless the 's+' replaces the whole Place sequence at the same time with the 2nd parameter. Having said that x.replaceAll("\s+", ""); will be much more efficient technique for trimming spaces (if string might have several contiguous Areas) due to https://mantrabarseuphoriabar42086.bloggerchest.com/31236224/not-known-details-about-mantra-mushroom-chocolate-bars