The 's' replaces one particular Room match at any given time however the 's+' replaces the whole Place sequence at the same time with the 2nd parameter. Even so x.replaceAll("\s+", ""); will likely be much more efficient strategy for trimming spaces (if string may have numerous contiguous Areas) simply because https://mantra-euphoria-gummies98641.shotblogs.com/the-single-best-strategy-to-use-for-s-45389223