Re: ask for a RE pattern to match TABLE in html

2008-07-01 Thread David C. Ullrich
In article [EMAIL PROTECTED], Jonathan Gardner [EMAIL PROTECTED] wrote: On Jun 27, 10:32 am, David C. Ullrich [EMAIL PROTECTED] wrote: (ii) The regexes in languages like Python and Perl include features that are not part of the formal CS notion of regular expression. Do they include

Re: ask for a RE pattern to match TABLE in html

2008-06-30 Thread David C. Ullrich
In article [EMAIL PROTECTED], Dan [EMAIL PROTECTED] wrote: On Jun 27, 1:32 pm, David C. Ullrich [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Jonathan Gardner [EMAIL PROTECTED] wrote: On Jun 26, 3:22 pm, MRAB [EMAIL PROTECTED] wrote: Try something like:

Re: ask for a RE pattern to match TABLE in html

2008-06-30 Thread Jonathan Gardner
On Jun 27, 10:32 am, David C. Ullrich [EMAIL PROTECTED] wrote: (ii) The regexes in languages like Python and Perl include features that are not part of the formal CS notion of regular expression. Do they include something that does allow parsing nested delimiters properly? In perl, there are

Re: ask for a RE pattern to match TABLE in html

2008-06-27 Thread David C. Ullrich
In article [EMAIL PROTECTED], Jonathan Gardner [EMAIL PROTECTED] wrote: On Jun 26, 3:22 pm, MRAB [EMAIL PROTECTED] wrote: Try something like: re.compile(r'table\b.*?.*?/table', re.DOTALL) So you would pick up strings like tabletrtdtabletrtdfoo/ td/tr/table? I doubt that is what

Re: ask for a RE pattern to match TABLE in html

2008-06-27 Thread Dan
On Jun 27, 1:32 pm, David C. Ullrich [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Jonathan Gardner [EMAIL PROTECTED] wrote: On Jun 26, 3:22 pm, MRAB [EMAIL PROTECTED] wrote: Try something like: re.compile(r'table\b.*?.*?/table', re.DOTALL) So you would pick up strings

ask for a RE pattern to match TABLE in html

2008-06-26 Thread oyster
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Cédric Lucantis
Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit : 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 The construct [abc] does not match a whole word

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Stefan Behnel
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 --

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Grant Edwards
On 2008-06-26, Stefan Behnel [EMAIL PROTECTED] 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?

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread David C. Ullrich
In article [EMAIL PROTECTED], Cédric Lucantis [EMAIL PROTECTED] wrote: Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit : 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

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread MRAB
On Jun 26, 7:26 pm, David C. Ullrich [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED],  Cédric Lucantis [EMAIL PROTECTED] wrote: Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit : that is, there is no TABLE tag between a TABLE, for example table something with out table

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Jonathan Gardner
On Jun 26, 11:07 am, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-06-26, Stefan Behnel [EMAIL PROTECTED] wrote: 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

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Jonathan Gardner
On Jun 26, 3:22 pm, MRAB [EMAIL PROTECTED] wrote: Try something like: re.compile(r'table\b.*?.*?/table', re.DOTALL) So you would pick up strings like tabletrtdtabletrtdfoo/ td/tr/table? I doubt that is what oyster wants. -- http://mail.python.org/mailman/listinfo/python-list