有人能告诉我这个正则表达式到底在做什么吗?
new StringTokenizer(string,":/.@\\;,+ ");
我无法理解这个正则表达式的确切含义,虽然它看起来像是根据特殊字符拆分字符串?
解决方法
StringTokenizer
不使用正则表达式.第二个参数是要用作标记之间的分隔符的字符列表.
JavaDoc说:
StringTokenizer
is 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 07001 or thejava.util.regex
package instead.