验证随心记

xiaoxiao2021-02-28  7

1.邮箱

 

boolean isExist = false        Pattern p = Pattern.compile("\\w+@(\\w+\\.)+[a-z]{2,3}");          Matcher m = p.matcher(email);          boolean b = m.matches();   boolean isExist = false; Pattern p = Pattern.compile("^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"); Matcher m = p.matcher(email); boolean b = m.matches();  

 

转载请注明原文地址: https://www.6miu.com/read-1150037.html

最新回复(0)