Rumah >pembangunan bahagian belakang >tutorial php >php中Warning: preg_match_all(): Compilation failed: lookbehind assertion
今天在测试正则表达式中相关环视的代码时,发现有个错误 错误信息如下: Warning: preg_match_all(): Compilation failed: lookbehind assertion is not fixed length at offset 代码如下:
将上面的代码改为:
其实,不用环视来匹配,直接用分组来捕获内容,只是这样要在返回的结果中筛选一下
|