On 4 Aug 2005 11:54:38 -0700, yaffa <[EMAIL PROTECTED]> wrote:
> does anyone have sample code for parsting an html file to get contents
> of a td field to write to a mysql db?  even if you have everything but
> the mysql db part ill take it.
> 

Do you want something like this?

In [1]: x = "something <td><b>something</b> else</td> and\nanother thing <td>in
a td</td> and again else"

In [2]: import re

In [3]: r = re.compile('<td>(.*?)</td>', re.S)

In [4]: r.findall(x)
Out[4]: ['<b>something</b> else', 'in a td']

If not, you'll have to explain more clearly what you want.

Peace
Bill Mill
bill.mill at gmail.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to