The 's' replaces one Place match at a time but the 's+' replaces The full space sequence without delay with the next parameter. Having said that x.replaceAll("\s+", ""); might be far more effective way of trimming spaces (if string might have a number of contiguous spaces) mainly because of potentially https://mantra-nootropic-bar42975.blogoxo.com/31467848/not-known-factual-statements-about-mantra-mushroom-chocolate