> > Less is more: > > pat = re.compile(r'href="([^"]+)') > pat.search(your_link) > >
Be sure to also catch: <link type="text/css" HREF="mystylesheet.css" rel="stylesheet"> <link type="text/css" href=mystylesheet.css rel="stylesheet"> <link type='text/css' href='mystylesheet.css' rel='stylesheet'> And it's not certain whether the OP is interested in tags like: <a href="blah.html"> -- Paul -- http://mail.python.org/mailman/listinfo/python-list