I have a string like this:
mysz = \"name=john age=13 year=2001\";
I want to remove the whitespaces in the string. I tried trim()
trim()
\W means "non word character". The pattern for whitespace characters is \s. This is well documented in the Pattern javadoc.
\W
\s