0

My list holds strings that are representing info on html tables, I want to delete the extra info in the tags ie. this is what is in there initially

<td style="color: red;">

and this is what I want to get <td>

so far I've tried this where table is my list of strings

[re.sub(r'<td[.*?]>','<td>',x,re.DOTALL) for x in tables]

pulling my hair out over this and I know it's something thats an easy fix can anyone give suggestions?

Thanks!

and yes I do need to use regular expressions and am not expected to use any extra html imports...

justDare
  • 55
  • 5

0 Answers0