I am trying to scrape a html page and I know there are html parsers but since the html is not well structured I need to mix it with some regular expressions. The html im trying to scrape looks like this: <tr bgcolor="#CCCCCC"> <td colspan="2"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">1º Período Ideal</span></font></td> <td><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">Créd.<br/> Aula</span></font></td> <td><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">Créd.<br/> Trab.</span></font></td> <td align="center"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">CH</span></font></td> <td align="center" width="6%"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">CE</span></font></td> <td align="center" width="6%"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">CP</span></font></td> <td align="center" width="6%"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="txt_arial_8pt_black">ATPA</span></font></td> </tr> And my regular expression looks like this: r'''<span class="txt_arial_8pt_black">(.*?)</span>''' I'm trying to get the '1º Período Ideal' bit, but somehow it doesn't get recognized by this regular expression although some other bits of the code do get recognized, such as the 'CE', 'CP', 'ATPA' which for me look the same as the bit I want to get. But I don't understand why. Can somebody help me please?