php中文匹配问题

近期看到一个php漏洞问题,遂升级了服务器php到8,然后有个插件出问题了:Warning: preg_match_all(): Compilation failed: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u at offset

发现是该插件正则中 [\u4e00-\u9fa5]有问题,改为 [\p{Han}]后即可。

上一篇
下一篇