php错误-preg_match函数

webpenson, 8 十月, 2021

php版本7.4.23

Warning: preg_match(): No ending delimiter '^' found in /www/wwwroot/xxxxxx.cn/formstringhandler.php on line 15

 

从eregi()替换为preg_match()后报错  把原来的正则'^[0-9]$'    改为  '/^[0-9]$/'    加了两个斜杠

在php正则有两种语法,一种POSIX,另一种Perl,???

评论