The 's' replaces a single space match at any given time nevertheless the 's+' replaces the whole Place sequence simultaneously with the 2nd parameter. Even so x.replaceAll("\s+", ""); is going to be far more effective way of trimming spaces (if string might have a number of contiguous Areas) due to https://elliottxfynb.theideasblog.com/31813602/fascination-about-mantra-mushroom-gummies