正则表达式

来源:互联网 发布:linux怎么执行命令 编辑:程序博客网 时间:2024/06/05 00:37
String regExp = "^((13[0-9])|(15[^4])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$";
Pattern p = Pattern.compile(regExp);
Matcher m = p.matcher("1988888888");
System.out.println(m.matches());
0 0