<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]
- Reliably stripping out only the email address? Bryan F. Hogan
- Re: Reliably stripping out only the email address? Mike Townend
- Re: Reliably stripping out only the email addres... Bryan F. Hogan
- Re: Reliably stripping out only the email ad... Mike Townend
- Re: Reliably stripping out only the emai... Bryan F. Hogan
- RE: Reliably stripping out only the... Paul Vernon
- RE: Reliably stripping out only the email address? Pascal Peters
- Re: Reliably stripping out only the email addres... Bryan F. Hogan
- Re: Reliably stripping out only the email ad... Thomas Chiverton
- Re: Reliably stripping out only the emai... Bryan F. Hogan
- RE: Reliably stripping out only the email address? Pascal Peters
- RE: Reliably stripping out only the email address? Pascal Peters