<CFSCRIPT>
function ExtractEmail(sString)
{
    return trim(ReReplace(sString, ".*<([^>]*)>.*", "\1"));
}
</CFSCRIPT>
<CFSET lstEmails = '[EMAIL PROTECTED],<[EMAIL PROTECTED]>,DisplayName
<[EMAIL PROTECTED]>,"DisplayName" <[EMAIL PROTECTED]>,[EMAIL PROTECTED] (DisplayName)'>

<CFLOOP LIST="#lstEmails#" INDEX="idxFoo">
    <CFOUTPUT>#ExtractEmail(idxFoo)#</CFOUTPUT><BR>
</CFLOOP>

works fine on all but the last entry, I havnt come across any of ours
that had that format so havnt worried about it :)

HTH

Jedi

Bryan F. Hogan wrote:

> Thanks
>
> I think this only strips out a string between the lt and gt
>
> Happen to have one that will work on these?
>
> [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> DisplayName <[EMAIL PROTECTED]>
> "DisplayName" <[EMAIL PROTECTED]>
> [EMAIL PROTECTED] (DisplayName)
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to