The 's' replaces 1 space match at any given time even so the 's+' replaces the whole House sequence simultaneously with the second parameter. On the other hand x.replaceAll("\s+", ""); is going to be a lot more efficient technique for trimming spaces (if string might have a number of contiguous https://mantramushroomchocolateba43097.blogsidea.com/37657846/how-much-you-need-to-expect-you-ll-pay-for-a-good-mantra-mushroom-chocolate-bars