The 's' replaces 1 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+", ""); will likely be much more efficient strategy for trimming spaces (if string may have numerous contiguous Areas) since of probably considerably less https://mantra-nootropic-bar43086.blogunteer.com/30574103/mantra-mushroom-chocolate-bars-can-be-fun-for-anyone