The beautiful thing about BeautifulSoup is that you don't have to use regexp to parse HTML data.
This is the correct way of using BS:
from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("http://finance.yahoo.com/q?s=AAPL&q1=1")
soup = BeautifulSoup(html)
my_span = soup.find('span', {'id': 'yfs_l84_aapl'})
print(my_span.text)
Which yields
540.04