I'm writing a code that should extract tags from an HTML code (I'm skipping parts about parsing and stuff). I'm testing it using a simple fixed string however, it doesn't remove this <div> tag and I have no idea why...
Thanks...
import re
RegExpression_Tags = r"<.*?>"
html = """
<div style="background: url(/groups/roundedcorners?
c=999999&bc=white&w=4&h=4&a=af) 0px 0px; width: 4px; height: 4px">
Ask how to use HTMLParser
</div>"""
p = re.compile(r"<.*?>")
NoTags = p.sub( '' , html)
print NoTags