The 's' replaces 1 space match at any given time nevertheless the 's+' replaces the whole Place sequence at once with the next parameter. Nevertheless x.replaceAll("\s+", ""); will be extra successful method of trimming Areas (if string can have various contiguous spaces) because of doubtless much less no of replacements https://mantramushroomgummies42738.jts-blog.com/30551245/the-5-second-trick-for-mantra-mushroom-chocolate-bars