In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Cc Zona) wrote:

> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Cditty) wrote:
> 
> > ie....User email address is "Chris Ditty" 
> > <[EMAIL PROTECTED]>  or  Chris Ditty <[EMAIL PROTECTED]>
> > 
> > I need to be able to strip the quotes and everything between them and the 
> > < > signs from the first one and then the name and the < > signs from the 
> > second.
> > 
> > Does anyone know how to do this quickly and easily?
> 
> <http://php.net/preg-replace>.  For example:
> 
> preg_replace('/^.*<(.+)>.*$/',"$1",$mailstring);

Whoops.  Hit send too quickly.  That should be:

$newstring=preg_replace('/^.*<(.+)>.*$/',"$1",$mailstring);

Note that this is *just* an example.  It will break where there are 
multiple addressees, a less-than sign in the addressee's name, etc.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to