John Blogger wrote: > That I want a particular tag value of one of my HTML files. > > ie: I want only the value after 'href=' in the tag >> > > '<link href="mystylesheet.css" rel="stylesheet" type="text/css">' > > here it would be 'mystylesheet.css'. I used the following regex to get > this value(I dont know if it is good).
No matter how good it is you should still use something that understands html: >>> from BeautifulSoup import BeautifulSoup >>> html='<link href="mystylesheet.css" rel="stylesheet" type="text/css">' >>> page=BeautifulSoup(html) >>> page.link.get('href') 'mystylesheet.css' -- - Justin -- http://mail.python.org/mailman/listinfo/python-list