ask for a RE pattern to match TABLE in html

Grant Edwards grante at
Thu Jun 26 20:07:19 CEST 2008

On 2008-06-26, Stefan Behnel <stefan_ml at> wrote:
> 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?

Stating it differently: in order to correctly recognize HTML
tags, you must use an HTML parser.  Trying to write an HTML
parser in a single RE is probably not practical.

Grant Edwards                   grante             Yow! I want another
                                  at               RE-WRITE on my CEASAR

More information about the Python-list mailing list