The 's' replaces one particular Room match at any given time although the 's+' replaces The entire space sequence directly with the second parameter. Having said that x.replaceAll("\s+", ""); might be far more productive way of trimming Areas (if string might have a number of contiguous spaces) for the reason https://mantra-euphoria-gummies86419.timeblog.net/67238755/considerations-to-know-about-s