The 's' replaces 1 space match at any given time nevertheless the 's+' replaces the whole Place sequence at the same time with the 2nd parameter. On the other hand x.replaceAll("\s+", ""); might be far more effective technique for trimming Areas (if string can have various contiguous spaces) because of https://mantra-hero-bar65208.izrablog.com/31897879/the-basic-principles-of-s