The 's' replaces a single Place match at any given time though the 's+' replaces the whole House sequence at once with the next parameter.Having said that x.replaceAll("s+", ""); will be much more effective means of trimming spaces (if string might have various contiguous Areas) mainly because of doubtless a lot less no of replacements owing the to