邮箱的判断

1  /**
2      * 判断email是否合法
3      */
4     public static boolean checkLoginEmail(String loginStr) {
5         String regEx = "^([a-z0-9_A-Z]+[-|\\.]?)+[a-z0-9_A-Z]@([a-z0-9_A-Z]+(-[a-z0-9_A-Z]+)?\\.)+[a-zA-Z_]{2,}$";
6         Pattern p = Pattern.compile(regEx);
7         Matcher m = p.matcher(loginStr);
8         return m.matches();// boolean
9     }

简单格式

public static boolean isKaChao(String kachao){  
        Pattern p = Pattern.compile("^(0){5}3[0-9]{4}$");  
        Matcher m = p.matcher(kachao); 
        return m.matches();
        }

 

相关文章:

  • 2022-12-23
  • 2022-02-02
  • 2021-12-08
  • 2021-07-11
猜你喜欢
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案