The 's' replaces one House match at a time however the 's+' replaces The complete Room sequence at once with the next parameter. Nevertheless x.replaceAll("\s+", ""); will probably be more economical means of trimming Areas (if string may have multiple contiguous spaces) because of doubtless much less no of replacements https://mantra-chocolate-bars31975.idblogmaker.com/30708571/the-best-side-of-mantra-mushroom-gummies