62,628
社区成员
发帖
与我相关
我的任务
分享//手机
Pattern regex = Pattern.compile(MessageServiceConsts.RE_MOBILE);
//Matcher matcher = regex.matcher(str);
if(regex.matcher(str).matches())
return MessageServiceConsts.ADVISE_CONTACT_TYPE_MOBILE;
//邮箱
regex = Pattern.compile(MessageServiceConsts.RE_EMAIL);
//Matcher matcher = regex.matcher(str);
if(regex.matcher(str).matches()){
System.out.println(MessageServiceConsts.ADVISE_CONTACT_TYPE_EMAIL);
return MessageServiceConsts.ADVISE_CONTACT_TYPE_EMAIL;
}