作者:客户服务部小谢娟_387 | 来源:互联网 | 2018-05-18 17:19
{代码...}报错preg_match():Compilationfailed:lookbehindassertionisnotfixedlengthatoffset24是为啥呢?就是s*那里,php的正则不是这样写嘛?
preg_match("/(?<=).*?(?=<\/p>)/", $html, $result);
报错
preg_match(): Compilation failed: lookbehind assertion is not fixed length at offset 24
是为啥呢?
就是\s*那里,php的正则不是这样写嘛?
回复内容:
preg_match("/(?<=).*?(?=<\/p>)/", $html, $result);
报错
preg_match(): Compilation failed: lookbehind assertion is not fixed length at offset 24
是为啥呢?
就是\s*那里,php的正则不是这样写嘛?
后瞻断言的内容被严格限制为只能用于匹配定长字符串。
http://php.net/manual/zh/regexp.reference.assertions.php