Re: Strip emails from a document
| From: | Tim Streater | Date: | Sat, 26 Jan 2013 19:36:00 +0000 |
| Subject: | Re: Strip emails from a document | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-320110@lists.php.net to get a copy of this message | ||
On 26 Jan 2013 at 16:24, Tedd Sperling <tedd@sperling.com> wrote:
> I thought I had a function to strip emails from a document, but I can't find
> it.
>
> So, before I start writing a common script, do any of you have a simple script
> to do this?
I have a function that will take a comma separated string consisting of emails in these formats:
"Soap, Joe" <joe.soap@example.com>
Joe Soap <joe.soap@example.com>
(Joe Soap) joe.soap@example.com
and turn them into a list where all the above examples are converted to:
Joe Soap <joe.soap@example.com>
but it won't handle things like:
"joe@soap"@example.com
which I understand is also valid.
You are welcome to it if you wish.
Cheers,
--
Cheers -- Tim