It says zero or maybe more event of whitespace figures, followed by a comma after which followed by zero or more occurrence of whitespace characters.On the other hand x.replaceAll("s+", ""); are going to be much more effective method of trimming spaces (if string might have multiple contiguous Areas) mainly because of probably a lot less no of repl