On Tue, 11 Feb 2003, Wizard wrote:

> I'm writing a script to do email filtering, and I have some questions:
> 1.> These are all valid email address:
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED] <- this is valid, but not standard
>
> The problem is that last one with DOMAIN.CC format.

As others have pointed out, that's not the only oddball case you're likely
to come across. :)

Here's another one: future proofing. The two or three character TLD
constraint you see today isn't necessary, and maybe in the future we'll
see longer addresses ([EMAIL PROTECTED]). Or Rendezvous
might catch on, and addresses of the form [EMAIL PROTECTED] might become
common in some contexts.

You probably don't want to have to keep tweaking your code here. Darren's
right -- this is too much of a pain to bother with hand-rolling; offload
the work to a CPAN module and update it as needed.

If you're hell bent on doing this yourself, I'm sure the relevant RFCs
would be a good source of answers. I think rfc822 is the main mail one
relevant to your needs, but someone may correct me on that...


-- 
Chris Devers
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to