我想允许对一个定义的字符类进行多次重复:)。$data = 'abc@abc-abc.abc';echo preg_match('/^[a-z]+[a-z0-9._-]+[a-z]+@+[a-z0-9]+[._-]?+[a-z0-9]+\.?+([a-z0-9]{2,})$/', strtolower($data)); // works (echo 1)$data = 'abc@abc-abc.abc.abc';echo preg_match('/^[a-z]+[a-z0-9._-]+[a-z]+@+[a-z0-9]+[._-]?+[a-z0-9]+\.?+([a-z0-9]{2,})$/', strtolower($data)); // doesn't work (echo 0, but should return 1)
- 1 回答
- 0 关注
- 80 浏览
添加回答
举报
0/150
提交
取消