Pattern pMobile = Pattern.compile("^(1[3-9][0-9])\d{8}$"); Pattern pTel = Pattern.compile("^(0[0-9]{2,6}-)?([2-9][0-9]{5,10})+(-[0-9]{1,6})?$");
boolean mobileOk = pMobile.matcher(_mobile).matches(); boolean telOk = pTel.matcher(_tel).matches();