The 's' replaces 1 space match at a time however the 's+' replaces The complete Room sequence at the same time with the 2nd parameter. Even so x.replaceAll("\s+", ""); is going to be a lot more efficient strategy for trimming spaces (if string may have numerous contiguous Areas) since of https://mantra-euphoria-gummies99865.blogdigy.com/a-review-of-mantra-mushroom-gummies-46863826