php 正则断言里面使用*+

Warning: preg_match_all() [function.preg-match-all]: Compilation failed: lookbehind assertion is not fixed length at offset

(?<=]*>).*?(?=<\/h1>)

这句语句在php中始终报错

放在python内没有该问题,查了很多资料才找出原因

 

netlawe (2007-12-14 14:03:22)
该问题已经解决。
在php正则表达式中如果使用断言,则不能使用模糊匹配,必须为明确的值

如你可以直接匹配<font>,但不能有关于.,*,+等之类模糊的符号。

你可能感兴趣的:(php 正则断言里面使用*+)