Chris,

Way back in the beginning of April you posted the following regexp to the
CF-Talk as a regexp that can be used to check whether or not a string is a
properly formatted email address.

> Here's the code I use
>
> <CFSET IsEmail =
>
REFind("^([[:alnum:]][-a-zA-Z0-9_%\.]*)?[[:alnum:]]@[[:alnum:]][-a-zA-Z0-9%\
> .]*.[[:alpha:]]{2,}$", email)>

I liked your regexp so much more than my long, drawn out method so I cut and
pasted your code into my templates and went about my business.  Well, I just
discovered that the above regexp has a flaw.  My regexp skills aren't quite
as sharp as they should be, so I haven't had the best of luck figuring out
the problem on my own.

The problem I have is that this regexp returns true on a string containing
some alpha numeric characters, the "@", and then 4 more characters EXCLUDING
a period.  For example, if I pass "seth@argo" to the regexp it returns true,
signifying that the string is in fact a valid email address.  If there are
three or less characters after the "@" then it correctly returns false.  The
logic of the regexp SEEMS correct to me, and I can't seem to figure out why
this is happening.  I've double checked my code 4 times, and I have EXACTLY
what you posted to the list.

Could you please check and make sure that this is indeed the regexp that you
use (i.e. make sure there are no typos).  If it is NOT could you be so kind
as to send me the correct one?  If this IS what you are using then you might
want to check and see if your sites suffer from the same error.

Finally, one last and final question:  the only character in your regexp
that I don't understand is the "$" at the very end.  I can't find an
explanation of this meta character anywhere in Forta's section on regular
expressions.  What exactly does this character do?

Regards,
Seth Petry-Johnson
Argo Enterprise and Associates

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to