I've no experience with RegEx in coldfusion but I've done this in Linux before now:

cat file_with_emails | sed 's/ *(.*)//; s/>.*//; s/.*[:<] *//' > email_list.txt

does exactly what you're after assuming there is an email address like you've 
described on each line

- James

> -----Original Message-----
> From: Ryan Sabir [mailto:[EMAIL PROTECTED]
> Sent: Friday, 30 April 2004 2:49 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] RE: Reg expression help
> 
> 
> 
> What happens when my friend at a *.net address needs to be processed?
> 
> I would think that the expression would need to "get everything
> between the < and the >", but I'm not sure how to write it...
> 
> I should have said.. this is for cleaning out a database where the
> email addresses have been stored with the name in the same field, so
> expect .net, .org, entries as well.
> 
> thanks!
> 
> Friday, April 30, 2004, 2:46:21 PM, you wrote:
> 
> TF> <cfset result = reFindNoCase("[EMAIL PROTECTED]", string, 1, "true")>
> TF> <cfdump var="#result#">
> TF> I think that regex will do, use mid to retrieve the string.
> 
> TF> -----Original Message-----
> TF> From: Ryan Sabir [mailto:[EMAIL PROTECTED]
> TF> Sent: Friday, 30 April 2004 2:40 PM
> TF> To: CFAussie Mailing List
> TF> Subject: [cfaussie] Reg expression help
> 
> 
> TF> Can someone give me the regular expression that will grab just the
> TF> email address out of a string that looks like this:
> 
> TF> Ryan Sabir <[EMAIL PROTECTED]>
> 
> TF> I want to end up with
> 
> TF> [EMAIL PROTECTED]
> 
> TF> Should I be using REFind or REReplace for this?
> 
> TF> i had a few goes, but didn't get it working.... :(
> 
> TF> thanks...
> 
> TF> -----------------------
> TF> Ryan Sabir
> TF> Newgency Pty Ltd
> TF> 2a Broughton St
> TF> Paddington 2021
> TF> Sydney, Australia
> TF> Ph (02) 9331 2133
> TF> Fax (02) 9331 5199
> TF> Mobile: 0411 512 454
> TF> http://www.newgency.com/index.cfm?referer=rysig 
> 
> 
> TF> ---
> TF> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> TF> To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> 
> TF> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> TF> http://www.mxdu.com/ + 24-25 February, 2004
> 
> TF> ---
> TF> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> TF> To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> 
> TF> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> TF> http://www.mxdu.com/ + 24-25 February, 2004
> 
> 
> -----------------------
> Ryan Sabir
> Newgency Pty Ltd
> 2a Broughton St
> Paddington 2021
> Sydney, Australia
> Ph (02) 9331 2133
> Fax (02) 9331 5199
> Mobile: 0411 512 454
> http://www.newgency.com/index.cfm?referer=rysig 
> 
> 
> ---
> You are currently subscribed to cfaussie as: 
> [EMAIL PROTECTED]
> To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004
> 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to