regex= '<th scope="row" width="48%">52wk Range:</th><td class="yfnc_tabledata1"><span>(.+?)</span> - <span>(.+?)</span></td>'
pattern = re.compile(regex)
LBUB = re.findall(pattern,htmltext)
I am trying to do basic data scraping in Python and perform some calculations on the returned real numbers. I have shown a small extract from the program so you can get the basic idea. I want it to read a html file and return certain numbers. The issue is that the real numbers are returned within a string variable like this...
[('90.77', '134.54')]
I want to extract the numbers from the variable so that they can be used as separate float variable. Does anybody know how to extract the two real numbers from within the string variable, basically getting rid of the ')], This is in Python 2.7.10