how to trim white space only which are more than two simultaniously code example Example: java remove double spaces StringUtils.normalizeSpace(string);