The 's' replaces one space match at any given time even so the 's+' replaces the whole Place sequence simultaneously with the 2nd parameter. Even so x.replaceAll("\s+", ""); is going to be a lot more efficient technique for trimming spaces (if string might have several contiguous Areas) mainly because of https://mantrabarseuphoriabar42086.bloggerchest.com/31236224/not-known-details-about-mantra-mushroom-chocolate-bars