There are other rules to being a valid email address IIRC.
I remember doing some of this in the past, and it can get complicated.
For example a single period is valid, but 2 periods in a row is not.
Also period dash ".-" and dash period "-." isn't valid either.
Back then for the host/domain portion the top level domain could only be
2 or 3 characters. I know it's more now (ie .info). 
Names (the part before the @) must end in a letter or number.
Etc...

So you might want to divide on the "@" into a name portion and a
host/domain portion and test them individually.

I finally ended up writing code to get the MX for the domain, opening a
connection to it, tell it the recipient's name and close the connection
not sending any actual email. If everything passed, I was fairly safe
that that the email was at least valid for someone. But I didn't do with
is UV/UD, it was on a web server, could have been perl or more likely
PHP.  I probably have that code somewhere if it would help.

Robert



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Claus Derlien
Sent: Tuesday, May 03, 2005 9:36 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Validating an email adress 

Both solution seems to work nicely, but i will stick to the pattern 
matching solution, time to test!! :-))

thanks a lot

claus derlien

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Brian Leach
> Sent: Tuesday, May 03, 2005 1:34 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Validating an email adress 
> 
> 
> Claus,
> 
> Since the MATCH operator handles alphas OR numerics and not 
> both, this is
> the closest I can get using a pattern match:
> 
> GoodEmail = ( Convert("_.1234567890","XXXXXXXXXXXX",Email) Matches
> "1A0A'@'1A0A")
> 
> Brian

Frie Funktionfrer - faglig organisation og tvfrfaglig a-kasse -
www.f-f.dk

************************************************************************
***************************************************************
Denne email og alle filer vedlagt som bilag kan indeholde fortroligt
materiale, der kun er beregnet for adressaten,
og maa ikke udleveres eller kopieres til uvedkommende. Har De ved en
fejltagelse modtaget denne email, bedes
De venligst omgaaende meddele os dette pr. telefon : 6313 8550. Paa
forhaand tak.
************************************************************************
***************************************************************
This email and any files transmitted with it may contain confidential
information intended for the addressee(s) only.
The information is not to be surrendered or copied to unauthorised
persons. If you have received this
communication in error, please notify us immediately by telephone: +45
6313 8550. Thank you.
************************************************************************
***************************************************************
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to