正则匹配手机号码

function preg_mobile($str){
    preg_match('/(13[0-9]|14[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9])\d{8}/', $str, $matches);
    return empty($matches) ? '' : $matches[0];
}
welcome come back
讨论数量: 1

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!