The 's' replaces one particular Area match at any given time although the 's+' replaces The entire House sequence simultaneously with the second parameter. However x.replaceAll("\s+", ""); will be additional productive method of trimming Areas (if string can have many contiguous spaces) mainly because of potentially less no of replacements https://deanopojb.blogs100.com/31803197/the-2-minute-rule-for-mantra-mushroom-chocolate