我有一个问题,我需要抓取IP地址从以下部分的电子邮件标题。在
Received: from smtprelay.b.mail.com (smtprelay0225.b.mail.com. [11.11.11.11])
by mx.google.com with ESMTP id g7si12282480pat.225.2014.07.26.06.53.24
for <a@gmail.com>;
我只需要在python中使用正则表达式输出11.11.11.11。在
我们会很感激你的帮助。在
谢谢。在
Tags:
试试看这个。用
^{pr2}$re.findall
。在参见演示。在
http://regex101.com/r/gT6kI4/10
似乎您正在尝试获取
[]
括号内的数据。在或者
^{pr2}$使用正则表达式
提取ip
查看regex的工作原理:http://regex101.com/r/lI0rU3/1
^{pr2}$相关问题 更多 >
编程相关推荐