Python look-behind regex issue: Invalid regular expression: look-behind requires fixed-width pattern

China☆狼群 提交于 2019-12-06 11:31:41

Python re module, as most languages (with the notable exception of .NET), doesn't support variable length lookbehind.

Can't you use a capturing group instead ?

“[^”]*(</p>\s*<p[^>]*>)

Data in the first capturing group.

Lookbehinds need to be zero-width, thus quantifiers are not allowed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!