in reply to regex question (new)

Verifying e-mail addresses with a regex is not possible. It is possible to make some guesses, but a regex is not the best solution as one has little to no control over the structure of the e-mail address.

Try Email::Find. It will extract the e-mails for you. Documentation can be found here.

For the record, the following are all structurally valid e-mail addresses (though they don't go anywhere).

Alfred Neuman <Neuman@BBN-TENEXA> ":sysmail"@ Some-Group. Some-Org Muhammed.(I am the greatest) Ali @(the)Vegas.WBA
The above examples were published in CGI programming with Perl, Second Edition. If you'd like more information, check out RFC822.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just go the the link and check out our stats.

Replies are listed 'Best First'.
RE: (Ovid) Re: regex question (new)
by agoth (Chaplain) on Nov 10, 2000 at 21:31 UTC
    Thanks, but Im not even attempting to validate them at this point, I am simply trying to identify which TD pairs have emails in them to extract the addresses from the file. Its the only identifier I can even vaguely rely on......

    Update from the pod:

    item This module requires 5.005_63 or higher!

    This module runs so slow as to be unusable with 5.005 stable. I'm not sure, but it might be because I build up my search regex using lots of compiled regexes. Either way, it runs orders of magnitude faster under 5.005_63.

    that blows me out of the water for starters.....