The 's' replaces one particular Room match at any given time although the 's+' replaces The entire Place sequence simultaneously with the 2nd parameter. Having said that x.replaceAll("\s+", ""); is going to be far more effective way of trimming Areas (if string can have many contiguous spaces) mainly because of https://mantra-mushroom-chocolate97531.blogadvize.com/38397299/not-known-factual-statements-about-mantra-mushroom-chocolate-bars