The 's' replaces just one Place match at a time though the 's+' replaces The full space sequence without delay with the next parameter. Even so x.replaceAll("\s+", ""); will likely be much more efficient strategy for trimming spaces (if string can have many contiguous spaces) mainly because of potentially fewer https://deanopojb.blogs100.com/31803197/the-2-minute-rule-for-mantra-mushroom-chocolate