The 's' replaces just one Room match at any given time however the 's+' replaces The entire Room sequence simultaneously with the second parameter.However x.replaceAll("s+", ""); will likely be far more successful strategy for trimming spaces (if string can have multiple contiguous Areas) simply because of potentially much less no of replacements d… Read More