We do a fair amount of parsing of email addresses for our
http://www.spamex.com service and found that the regex to properly parse
email and remain RFC compliant is actually about 1 page long (we found it
published somewhere).  We ended up not going the regex way due to the
complexity and just parsing the email address one character at a time to
isolate the email address.  Not as elegant but much easier.

Justin

> -----Original Message-----
> From: Alex [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 4:13 PM
> To: CF-Talk
> Subject: Re: Question on Email Addresses
> 
> 

> <CFSET email="myname <[EMAIL PROTECTED]>">
> <cfset x=reReplaceNoCase(email,".*<(.*)>.*","\1")>
> <CFOUTPUT>#x#</CFOUTPUT>
> 
> 
> On Mon, 20 May 2002, Randell B Adkins wrote:
> 
> > I am trying to parse an email address due to the
> > friendly email addresses by using CFPOP.
> > 
> > If the #FROM# resembles: [EMAIL PROTECTED]
> > then I am fine however since there are friendly email
> > address which look like "myname" <[EMAIL PROTECTED]>
> > then I have to use HTMLEditFormat to get the email address.
> > 
> > However using this code, does not FIND the "<" in the email 
> > addresses that are Friendly however it will fine the "@" symbol.
> > 
> > What am I missing???
> > 
> > <cfset checkEmail = #HTMLEditFormat(from)#>
> > <cfif #FindNoCase("<",checkEmail,1)#>
> >   Email Start Point Located
> > <cfelse>
> >   <!--- Use CheckEmail --->
> >   If it is a Friendly Email Address then 
> >   When I validate this in the DB, it looks
> >   for the entire string "myname" <[EMAIL PROTECTED]> 
> >   and NOT just the email address.
> > </cfif>
> > 
> > sorry I am just not with it today to think about it any
> > longer and I know it is something so dang simple that I
> > am just overlooking...
> > 
> > Thanks in Advance!
> > 
> > 
> >                     NO - #findnocase("@",checkEmail,1)# - 
> >             </cfif>
> >             #LEN(checkEmail)#
> > 
> >             <br>
> > </cfoutput>
> > 
> > 
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to