The 's' replaces a single space match at any given time nevertheless the 's+' replaces the whole Area sequence simultaneously with the 2nd parameter. Nevertheless x.replaceAll("\s+", ""); will be additional productive method of trimming Areas (if string can have many contiguous spaces) mainly because of potentially fewer no of replacements https://mantrachocolatebars32075.blogzag.com/75465949/the-2-minute-rule-for-mantra-mushroom-chocolate