The 's' replaces a single Place match at any given time though the 's+' replaces The complete Area sequence directly with the next parameter.Nonetheless x.replaceAll("s+", ""); might be extra efficient way of trimming Areas (if string may have a number of contiguous spaces) since of potentially significantly less no of replacements due the to indis