Can someone tell me exactly what is this regex doing?
new StringTokenizer(string,":/.@\\;,+ ");
I could not understand the exact meaning of this Regex, though it looks like something to do with splitting a string based on special characters?
StringTokenizer does not use regular expressions. The second parameter is a list of characters to be used as separators between tokens.
The JavaDoc says:
StringTokenizeris a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use thesplitmethod ofStringor thejava.util.regexpackage instead.