import java.util.regex.Pattern; //导入的包
1:String REGEX_MOBILE = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"; // 手机号正则
2:进行匹配
Pattern.matches(REGEX_MOBILE, projectOwner.getContactPhone())
if(Pattern.matches(REGEX_MOBILE, projectOwner.getContactPhone())){ }