正则表达式 匹配电话号码,带+86的哦
public class MactchDemo { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub isMobileNO("+8613927818050"); } public static void isMobileNO(String mobiles){ Pattern p = Pattern.compile("^((\\+86)|(86))?[1][3456789][0-9]{9}$"); Matcher m = p.matcher(mobiles); System.out.println(m.matches()+"---"); } }原文链接:https://www.f2er.com/regex/359797.html