It states zero or even more occurrence of whitespace characters, accompanied by a comma and after that followed by zero or maybe more occurrence of whitespace characters.On the other hand x.replaceAll("s+", ""); will be more effective method of trimming Areas (if string might have various contiguous Areas) due to the fact of doubtless considerably