The 's' replaces one House match at a time however the 's+' replaces The complete Room sequence at the same time with the 2nd parameter. Nonetheless x.replaceAll("\s+", ""); will likely be much more economical means of trimming Areas (if string may have multiple contiguous spaces) because of doubtless significantly less https://mantra-mushroom-chocolate32086.myparisblog.com/31847519/the-best-side-of-s