代码如下 | 复制代码 |
$str_arr = array( $patt_email = "/^[_a-za-z0-9-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$/"; foreach ($str_arr as $str) |
// 17、url正则表达式。
代码如下 | 复制代码 |
$str_arr = array( $patt_url = "/^(http://)?[a-za-z0-9]+(.[a-za-z0-9]+)*.+$/"; foreach ($str_arr as $str) |