The 's' replaces one House match at a time however the 's+' replaces The complete Area sequence at once with the next parameter. However 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-mushroom-chocolate97531.blogadvize.com/38397299/not-known-factual-statements-about-mantra-mushroom-chocolate-bars