The 's' replaces a single Area match at any given time even so the 's+' replaces the whole House sequence simultaneously with the second parameter. Nevertheless x.replaceAll("\s+", ""); will probably be more economical strategy for trimming spaces (if string may have numerous contiguous Areas) simply because of probably considerably less https://mantra-mushroom-chocolate97531.liberty-blog.com/31462426/helping-the-others-realize-the-advantages-of-mantra-mushroom-chocolate