赞
踩
规则:允许数字、大小写字母和.,-_()/=+?!*;@ # :% []‘${}^|~\n\r\t等特殊字符
Pattern p= Pattern.compile("[a-zA-Z0-9_.,\\-()/=+?!*;@#:%\\[\\]‘\\\\${}^|~\\n\\r\\t ]{1,35}");
String str = ".,\\-()/=+?!*[\\]‘\\ 0.0${}^|~\n\r\t";
Matcher m = p.matcher(str);
System.out.println(m.matches());
以这个规则为例,其他的自己更改正则!
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。