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+", ""); might be far more effective technique for trimming spaces (if string might have several contiguous Areas) due to https://mantramushroomgummies87530.mdkblog.com/37123203/little-known-facts-about-mantra-mushroom-chocolate