The 's' replaces a single space match at any given time even so the 's+' replaces the whole space sequence without delay with the next parameter. Even so x.replaceAll("\s+", ""); will likely be much more economical means of trimming Areas (if string may have multiple contiguous Areas) simply because of https://mantra-euphoria-gummies85318.blog-eye.com/31440708/everything-about-s