html 2 plain text

Fredrik Lundh fredrik at pythonware.com
Mon May 29 04:46:19 EDT 2006


garabik-news-2005-05 at kassiopeia.juls.savba.sk wrote:

> text=re.sub(r'(?s)\<.+?\>', '', html_text)
> (this will keep html entities, though)

here's a variation that handles that too:

     http://effbot.org/zone/re-sub.htm#strip-html

</F>




More information about the Python-list mailing list