jsp页面暨Java后端验证手机号的正则表达式(最新)

1.页面示例



	


	
	

2.java示例

 public static void main(String[] args) {
    	Pattern pattern = Pattern.compile("^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[8|9]))\\d{8}$");
    	Boolean result = pattern.matcher("19900000000").matches();
    	System.out.println(result);
	}

 

你可能感兴趣的:(jsp,js,js验证)