The 's' replaces a person Place match at a time but the 's+' replaces The full Area sequence without delay with the next parameter. However x.replaceAll("\s+", ""); are going to be a lot more effective technique for trimming spaces (if string might have a number of contiguous Areas) due to https://mantra-bars-euphoria-bar31974.wssblogs.com/31394969/the-5-second-trick-for-mantra-mushroom-chocolate-bars