Java regex Remove duplicate spaces and tabs, leave one space between words and two between sentences. code example Example: java remove double spaces StringUtils.normalizeSpace(string);