It claims zero or maybe more occurrence of whitespace characters, followed by a comma and after that followed by zero or more occurrence of whitespace people.Even so x.replaceAll("s+", ""); might be extra efficient way of trimming Areas (if string may have a number of contiguous Areas) for the reason that of probably fewer no of replacements owing