The 's' replaces a person Place match at a time but the 's+' replaces The full Area sequence at once with the next parameter. Even so x.replaceAll("\s+", ""); is going to be a lot more efficient strategy for trimming spaces (if string might have several contiguous Areas) due to the https://raymondundsi.blogsuperapp.com/31876565/the-single-best-strategy-to-use-for-s