- 论坛徽章:
- 14
|
本帖最后由 lxyscls 于 2018-08-08 10:53 编辑
回复 1# pandaiam
In [11]: r = re.search('<p\ .*?TUIGUANG.*?</p>', 'jakee and zz done.<p>zzz</p> <p style=\"text-align: center;\" align=\"justify\">==TUIGUANG===</p>\n<p align=\"justify\"><img style=\"width: auto;\" src=\"https://imag.xxxx.com/b931035c-5bf2-4553-9593-07480f74a5c6.png\" /></p> this should not dispeared <p>ALL MY ...</p> <p > See you</p> behan')
In [12]: r.group()
Out[12]: '<p style="text-align: center;" align="justify">==TUIGUANG===</p>'
python
|
|