以下为使用PHP正则函数时产生的语法错误,这样可以知道大概是什么错误。
错误1:
Warning: preg_match_all() [function.preg-match-all]: Empty regular expression in abc.php on line 57
此错误为 正则表达式为空
错误2:
Warning: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash in abc.php on line 57
判断为第一个参数的正则表达式写法有问题 记得在前面和后面加上 / 符号。
评论: