The 's' replaces one Room match at any given time although the 's+' replaces The entire space sequence without delay with the second parameter. Nevertheless x.replaceAll("\s+", ""); will be more successful method of trimming Areas (if string can have various contiguous spaces) because of doubtless much less no of replacements https://mantrabarseuphoriabar42085.bloguerosa.com/30547852/mantra-mushroom-gummies-no-further-a-mystery