/**
* 检测字符串中只能包含中文、字母、数字、下划线、横线
* @param target
* @return
*/
public static boolean checkTarget(String target) {
final String format = "[^\\u4E00-\\u9FA5\\uF900-\\uFA2D\\w-_]";
Pattern pattern = (format);
Matcher matcher = (target);
return !();
}
转载于:/u/2376912/blog/2050787