The 's' replaces just one House match at any given time though the 's+' replaces The complete House sequence at once with the 2nd parameter.On the other hand x.replaceAll("s+", ""); will be far more productive means of trimming spaces (if string can have multiple contiguous Areas) for the reason that of probably much less no of replacements due the