tes*_*est 0 php regex
可能重复: 将ereg表达式转换为preg
我试图转换,但我一直在失败.
我的ereg: if (!ereg("^[a-zA-Z0-9]{3,16}$",$username)) {
if (!ereg("^[a-zA-Z0-9]{3,16}$",$username)) {
是错的,因为它已经过时了.我该如何切换到preg_match?
preg_match
Kin*_*nch 5
if (!preg_match("/^[a-zA-Z0-9]{3,16}$/",$username)) { /* .. */ }
请注意分隔符/.
/
归档时间:
14 年 前
查看次数:
95 次
最近记录: