The 's' replaces just one Room match at any given time although the 's+' replaces the whole Room sequence at the same time 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 https://mantra-chocolate-bars54207.theobloggers.com/37522890/about-s