Anyone else have problems with regular expressions in CF 4.5.1 SP2?
I have this reg exp code that validates an email address (found the
code in the archives of this list). When I run certain email addresses
through it, it locks up my CF server! It floors the CPU until I kill
the thread. And sometimes it doesn't lock up, but when the page is
displayed I can see that that part of the code took 18569 ms to execute!
I havn't been able to figure out exactly what it is in some addresses that
cause it. It seems to happen when I make it longer. If [EMAIL PROTECTED] goes
through, sometimes I try something like [EMAIL PROTECTED] and it hangs.

Does this code look OK, or is there a variant of it I could try that maybe
won't be buggy? My next option is to just do the validation piece by piece:
find the last ., make sure there are x chars after it, make sure it only has
one @ sign, no spaces or other ilegal chars, etc etc.

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

Thanks for any help.

Ryan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        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