I agree with @ccc
I used to use regex to do that sort of thing. You can get it to work, but it takes a lot of effort.
So I embarked to learn how Beautiful Soup works, and now that I've learned it a bit it's way easier and much more effective for many things (not just search).
Here's a little example from cheese.com. (I like cheese...not that I check this website, but cheese is good.)
# coding: utf-8
from bs4 import BeautifulSoup
url = 'http://www.cheese.com'
soup = BeautifulSoup(requests.get(url).text)
print soup.find('div', id='abstract') #find one div with id 'abstract' and print