The 's' replaces 1 Room match at a time nevertheless the 's+' replaces the whole Place sequence simultaneously with the 2nd parameter. Having said that x.replaceAll("\s+", ""); might be far more effective way of trimming spaces (if string might have many contiguous spaces) for the reason that of doubtless less https://mantra-mushroom-chocolate65308.blog2freedom.com/31359437/mantra-mushroom-gummies-no-further-a-mystery