Worked a treat - thankyou - I think I was trying to over engineer the solution :-)
++++++++++ Kevin Parker m: 0418 815 527 ++++++++++ -----Original Message----- From: .jonah [mailto:[email protected]] Sent: Sunday, 24 February 2013 7:21 AM To: cf-talk Subject: Re: Apostrophes in email addresses This seems to work, no? ^[A-Za-z0-9_\'\.-]{1,}\@([[:digit:]a-zA-Z-]{1,}\.){1,}[[:digit:]a-zA-Z-]+$ I added \' before the \. in the first set. On 2/22/13 11:30 PM, Kevin Parker wrote: > As much as I wonder why you would do it apparently the odd network > admin does and its valid. > > > > 100% of the time this little bit of regex has served me well until now. > > > > ^[\w\.-]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]+$ > > > > But I have a need to validate an email address that has an apostrophe > before the @ e.g. fred.o'[email protected] - I've > tried a variety of suggestions but all have caused errors in CF. The > context I'm using it in is. > > > > <CFIF > REFindNoCase("^[A-Za-z0-9_\.-]{1,}\@([[:digit:]a-zA-Z-]{1,}\.){1,}[[:d > igit:] > a-zA-Z-]+$" , TheEmailAddress) EQ 0> > > > > I found this which took a standards based approach but they error in > CF - http://www.regular-expressions.info/email.html > > > > I wonder if any you good folk have a little bit of regex or > suggestions that might fix this annoying little problem. > > > > Thank you. > > > > > > ++++++++++ > > Kevin Parker > > > > m: 0418 815 527 > > > > ++++++++++ > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354662 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

