Stripping scripts from HTML with regular expressions

Stefan Behnel stefan_ml at behnel.de
Wed Apr 9 16:18:27 EDT 2008


Michel Bouwmans wrote:
> I'm trying to strip all script-blocks from a HTML-file using regex.

You might want to take a look at lxml.html instead, which comes with an HTML
cleaner module:

http://codespeak.net/lxml/lxmlhtml.html#cleaning-up-html

Stefan



More information about the Python-list mailing list