Bryan,
If you want to strip all email addresses like below, use this:
REReplaceNoCase(str,"<[EMAIL PROTECTED],}>?","","all")
If you want to extract the email address:
REReplaceNoCase(str,"^.*([EMAIL PROTECTED],}).*$","\1")
Pascal
> -----Original Message-----
> From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
> Sent: donderdag 10 juni 2004 19:00
> To: CF-Talk
> Subject: Re: Reliably stripping out only the email address?
>
> Hi Mike it works on all but the last index.
>
> Thanks for the script.
>
> Mike Townend wrote:
> > <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>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: Reliably stripping out only the email address? Mike Townend
- Re: Reliably stripping out only the email address? Bryan F. Hogan
- Re: Reliably stripping out only the email addres... Mike Townend
- Re: Reliably stripping out only the email ad... Bryan F. Hogan
- RE: Reliably stripping out only the emai... Paul Vernon
- RE: Reliably stripping out only the email address? Pascal Peters
- Re: Reliably stripping out only the email address? Bryan F. Hogan
- Re: Reliably stripping out only the email addres... Thomas Chiverton
- Re: Reliably stripping out only the email ad... Bryan F. Hogan
- RE: Reliably stripping out only the email address? Pascal Peters
- Pascal Peters