private static String cleanWS ( String s ) { s = replaceAll ( s , OuterWhiteSpacesPtn , "" ) ; s = replaceAll ( s , WhiteSpacesPtn , " " ) ; return s ; }
Clean white space . Remove leading and trailing and replace internal runs with a single space character .