String str = "[abc,def],[abc],[def,zxc],[abc,qwe]";
我想从这个字符串中找出不重复的再分割成数组
String str[] = {"abc","def","zxc","qwe"};
String str = "[abc,def],[abc],[def,zxc],[abc,qwe]";
Pattern p = Pattern.compile("//w+");
// X+ X, one or more times /w A word character: [a-zA-Z_0-9] // The backslash character
Matcher m = p.matcher(str);
while(m.find()){
System.out.println(m.group());
}
打包成jar: 参考链接http://java.sun.com/docs/books/tutorial/deployment/jar/