php验证手机号码:"^1[3|4|5|7|8][0-9]尀尀d{8}$"?

2025-01-28 01:16:05
推荐回答(1个)
回答1:

用正则表达式:
$str = '';
$isMatched = preg_match('/0?(13|14|15|17|18|19)[0-9]{9}/', $str, $matches);
var_dump($isMatched, $matches);