Regular Expression Help Needed

Brad Bollenbach bbollenbach at
Sat Nov 17 16:35:16 CET 2001

"David A McInnis" <david at> wrote in message
news:mailman.1005960683.29958.python-list at
> Ok, I am not very good at regular expressions, so any help is greatly
> appreciated.
> Here is the situation.
> I have a database table that contains a text field.  This text field may
> may not contain email addresses.  I know how to read the content of field

Why "might" it not contain an email address? Specifically, what kind of data
is in the column? What format? An HTML webpage, XML, etc.? Either way, you
probably don't want to solve this via a regular expression: that takes too
much effort to get right.

If it's HTML, HTMLParser (in the htmllib module) makes the solution trivial.

Hope that helps,


More information about the Python-list mailing list