On Tue, Sep 13, 2005 at 12:59:43PM +0200, Stephane Bortzmeyer wrote: > On Wed, Sep 07, 2005 at 12:21:45PM -0700, > Steve Atkins <steve@xxxxxxxxxxx> wrote > a message of 26 lines which said: > > > /^[^@]*@(?:[^@]*\.)?[a-z0-9-_]+\.(?:a[defgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmoz]|e[ceghrst]|f[ijkmorx]|g[abdefhilmnpqrstuwy]|h[kmnrtu]|i[delnoqrst]|j[mop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrtwy]|qa|r[eouw]|s[abcdeghijklmnortvyz]|t[cdfghjkmnoprtvwz]|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]|edu|com|net|org|gov|mil|info|biz|coop|museum|aero|name|pro)$/ > > Very bad idea to hardcode the list of TLD. You are already late > (".jobs" and ".travel" are in the ICANN root). And are in my production code (despite being unusued, as yet). If you want to validate email addresses you _must_ check the TLD as part of the sanity checking, as many of the typos that are theoretically detectable are detectable by that check. Yes, you need to maintain that list correctly. But the list does not change often enough that keeping it in a dynamic table with the many orders of magnitude higher overhead makes any sense at all. Not hardcoding the list of TLDs would be a bad idea, if you need both performance and correctness. Cheers, Steve ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster