ilh*_*han 3 php regex
我可以[a-z0-9]*从[a-z0-9]*@example.com正则表达式中获取该部分,但我想限制[a-z0-9]*20个字符的部分.正则表达式有可能吗?
[a-z0-9]*
[a-z0-9]*@example.com
编辑:我改变了主意,我不会使用{0,20},我会使用strlen().这个:if (preg_match('/[a-z0-9]*@metu\.edu\.tr/',$_POST['email']) && strlen($_POST['email']) < 35)
{0,20}
strlen()
if (preg_match('/[a-z0-9]*@metu\.edu\.tr/',$_POST['email']) && strlen($_POST['email']) < 35)
GWW*_*GWW 12
[a-z0-9]{0,20}@example.com 将它限制为0到20个字符.
[a-z0-9]{0,20}@example.com
归档时间:
14 年,8 月 前
查看次数:
441 次
最近记录: