in reply to Practical e-mail address validation
So should I upload this to CPAN? Did my coworker miss something close to this already on CPAN?
There are a lot of modules on CPAN dealing with e-mail addresses. Unfortunately, a lot of them are rubbish. You might want to take a look at the Perl Email Project if you haven't already.
If I understand you correctly (without specifically having worked through the regexen), you consider the following addresses to be equivalent:
What about addresses with different top-level-domains, but equal second-level-domains? For example emails from/toeverybody@example.com "Eve" <everybody@example.com> (Rybody) EveRybody+whatever@EXAMPLE.COM
are all routed from/to the same mailbox. Are they equivalent to you?foo@gmail.com foo@gmail.net foo@gmail.com.au foo@gmail.at ... foo@gmail.za
In either case all you need is a tokeniser. It will allow you to compare exactly what it is you need to determine equivalency.
Some of the existing modules tokenise the addresses internally to some extent, but Email::Address also gives you nice accessors for the resulting tokens, so it would be my prime choice for solving what I perceive your problem to be.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Practical e-mail address validation (Email::Address)
by tye (Sage) on Sep 13, 2008 at 16:35 UTC | |
by everybody (Scribe) on Sep 13, 2008 at 20:16 UTC | |
by tye (Sage) on Sep 13, 2008 at 22:11 UTC |
In Section
Cool Uses for Perl