Re: extracting email lists
| From: | dav | Date: | Thu, 08 Nov 2001 07:44:34 +0000 |
| Subject: | Re: extracting email lists | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73846@lists.php.net to get a copy of this message | ||
Check for regexp.
1) Open the file
2) Load the file in a variable
3) Parse the variable with the regexp
4) Close the file
5) Obtain the "all_emails" variable
Byez
"Wm" <wm@blanktv.com> ha scritto nel messaggio
news:3BE997B9.469587E9@blanktv.com...
> 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.
>