im having a bit of trouble with this code as it is not working how i intend it. i know regular expressions arent the best way to fo this but i couldnt figure out how to do it with the html parser and beautiful soup isnt an option. heres what im trying to do. i have an html file and i need to extract the value between
<div class="e_mail"> and </div>
when i use the below code however it returns the email address as such:
['[email protected]']
how can i get the email address without the brackets and quotes? id rather use something cleaner than reg but as i said couldnt figure out the html parser.
f=urllib.urlopen('results.html')
s = str(f.read())
return re.compile('<div class="e_mail">(.*?)</div>', re.DOTALL).findall(s)