在python中找到所有带正则表达式的链接

时间:2014-06-08 07:42:59

标签: python regex python-3.x hyperlink html-content-extraction

我的文字充满了带风格的链接地址

href=\'http://address.com\'

我在Python 3.4中使用re.findall('"((http)s?://.*?)"', srcCode)来提取所有链接,但不起作用。我该如何解决?

1 个答案:

答案 0 :(得分:1)

交换引号

re.findall("'((http)s?://.*?)'", srcCode)