I have a text file with html:
Blah, blah, blah
some text is here.
<div> something here
something else </body></html>
so far, if the tags are on one line this works:
textfile = open("htmlfile.txt", "r+")
text = textfile.read()
a = re.search('<div.+?<\/html>', text)
repstr = c.group(0)
text = text.replace(repstr, '', 1)
works fine, I don't have nested tags. But if the tags are on multiple lines, like the first example, it doesn't work! what can I use to test multiple lines?