Regex Help

Support Desk support.desk.ipg at
Mon Sep 22 18:37:46 CEST 2008

Anybody know of a good regex to parse html links from html code? The one I
am currently using seems to be cutting off the last letter of some links,
and returning links like


the code I am using is 

regex = r'<a href=["|\']([^"|\']+)["|\']>'

page_text = urllib.urlopen('')
page_text =

links = re.findall(regex, text, re.IGNORECASE)

More information about the Python-list mailing list