Commit 4c91d92c by fanlongfei

Merge branch 'develop' into 'test'

修改正则



See merge request !3
parents fd656597 1cd40236
...@@ -10,8 +10,8 @@ import java.util.regex.Pattern; ...@@ -10,8 +10,8 @@ import java.util.regex.Pattern;
*/ */
public final class RegexUtils { public final class RegexUtils {
private static Pattern mobile1 = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"); // private static Pattern mobile = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
private static Pattern mobile = Pattern.compile("(\\+\\d+)?1[34578]\\d{9}$"); private static Pattern mobile = Pattern.compile("(\\+\\d+)?1[345678]\\d{9}$");
private static Pattern chinese = Pattern.compile("[\u4e00-\u9fa5]"); private static Pattern chinese = Pattern.compile("[\u4e00-\u9fa5]");
...@@ -111,4 +111,8 @@ public final class RegexUtils { ...@@ -111,4 +111,8 @@ public final class RegexUtils {
return m.find(); return m.find();
} }
public static void main(String[] args) {
boolean mobileNO = isMobileNO("16603042204");
System.out.println(mobileNO);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment