extracting email lists
| From: | wm | Date: | Wed, 07 Nov 2001 20:21:13 +0000 |
| Subject: | extracting email lists | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73790@lists.php.net to get a copy of this message | ||
hi,
was hoping somebody can help and i want to preface this by stating that
it is
NOT for unsolicited spam mail. i hate that crap.
we have a bunch of emails from people that have contacted our site.
they have been cut and pasted into a large word document.
here is an small example of the format:
<lasjkljsf@lsjdlkf.com> "THIS is - my....name", <kkjf_kdjf@ca.edu>
"john",
<kdjklfjd@lkdjlkf.com, lkdjf@kdjkljfd.com, fkdjkfjd@ldjkld.com> "hello
there"
with hundreds or thousands like that.
i was wondering if anybody can help me with extracting just the email
address
from this large .txt file.
i've tried opening the file into a variable with and without the
htmlspecialchars() function and the < and > are causing problems, and
i'm also not sure what
regexp to use to either get rid of all the "people's names" or to
extract the emails
only. any approaches would be helpful. a regexp that just validates a
single email
address is no help it seems.
thanks for any help.