ask for a RE pattern to match TABLE in html

Stefan Behnel stefan_ml at behnel.de
Thu Jun 26 19:58:04 CEST 2008


oyster wrote:
> that is, there is no TABLE tag between a TABLE, for example
> <table >something with out table tag</table>
> what is the RE pattern? thanks
> 
> the following is not right
> <table.*?>[^table]*?</table>

Why not use an HTML parser instead? Try lxml.html.

http://codespeak.net/lxml/

Stefan



More information about the Python-list mailing list