The 's' replaces one Area match at a time however the 's+' replaces The entire Area sequence at the same time with the next parameter.Even so x.replaceAll("s+", ""); are going to be additional successful way of trimming Areas (if string might have various contiguous Areas) mainly because of probably less no of replacements thanks the to proven fact