From: Ryan <[EMAIL PROTECTED]>

> <CFIF Len(fieldvalue) AND NOT 
>REFindNoCase('(^[[:alnum:]]([._-]?[[:alnum:]]+)*+\@[[:alnum:]]+([.-]?[[:alnum:]]+)*\.[[:alpha:]]{1,4}$)',
> fieldvalue, "True")>
>   Invalid!
> </CFIF>

I am not so sure about this regular expression.

I can buy that an email begins with a alpha numeric.
(^[[:alnum:]]

What I don't understand is this part...
([._-]?[[:alnum:]]+)*+

This says (unless ColdFusion regexps are some how really weird) that after the
initial alphanumeric, it is followed by 0 or more cases of 3 puncts,
followed by one or more alpha numerics.  This whole string is then required
to be followed by either a plus sign, or an asterisk.

That can't be right...  I know _I_ don't have either of those in my email
address.

In most regexp languages, the + has to follow a valid RegExp element.  If
the * binds to the paren'd string , then the + would be taken as a literal.
If the * binds tighter to the +, then that says that the * is required to
be present.


\@[[:alnum:]]+([.-]?[[:alnum:]]+)*\.[[:alpha:]]{1,4}$)

Note that there isn't a plus in the host part of your regular expression.

Can you provide an example of the address that is causing the problem?
You wouldn't have to provide the literal address - change the particular
letters in the name and host, but leave the number of letters and the
punctuation the same...

For instance, if the address causing the problem was
[EMAIL PROTECTED]
you could 'encode' it like

[EMAIL PROTECTED]

or some such thing...
-- 
Never apply a Star Trek solution to a Babylon 5 problem.
Larry W. Virden <mailto:[EMAIL PROTECTED]> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.
-><-

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to