The 's' replaces just one Room match at a time though the 's+' replaces The full space sequence without delay with the second parameter. Having said that x.replaceAll("\s+", ""); will be much more economical strategy for trimming spaces (if string may have numerous contiguous Areas) since of probably considerably less https://gunnerdvlzo.blue-blogs.com/38337382/s-an-overview