/** */
/**
* 匹配汉字,英文,数字,-,/,,[,],(,)
* */
public static boolean compile(String str) ... {
/**//*
* 匹配的正则表达式
* 字母数字:A-Za-z0-9_
* 汉字:/u4e00-/u9fa5
* /号:///
* 号://
* -号://-
* ()号:/(/) 汉字中的(): /uff08/uff09
* []号:/[/]
* */
Pattern p = Pattern.compile("[A-Za-z0-9_/(/)/uff08/uff09/u4e00-/u9fa5///[/]-]*");
return p.matcher(str).matches();
}
* 匹配汉字,英文,数字,-,/,,[,],(,)
* */
public static boolean compile(String str) ... {
/**//*
* 匹配的正则表达式
* 字母数字:A-Za-z0-9_
* 汉字:/u4e00-/u9fa5
* /号:///
* 号://
* -号://-
* ()号:/(/) 汉字中的(): /uff08/uff09
* []号:/[/]
* */
Pattern p = Pattern.compile("[A-Za-z0-9_/(/)/uff08/uff09/u4e00-/u9fa5///[/]-]*");
return p.matcher(str).matches();
}