import re
content = '<a href="http://www.baidu.com" target="_blank" class="a_title2">Elasticsearch Kibana 命令注入漏洞</a>'
pattern = r'<a.*?href="(.*?)".*?>(.*?)</a>'
ret = re.search(pattern, content)
if ret:
for x in ret.groups(): print (x)
运行结果:
http://www.baidu.com
Elasticsearch Kibana 命令注入漏洞
网友评论