For starters, you probably want to remove the Len() inside of:

REReplace(Len(Trim(Form.Years)), "[0-9]","","All")

To:

REReplace(Trim(Form.Years), "[0-9]","","All")

Plus, the NOT IsNumeric() will ALWAYS be true since you are stripping
out all numbers. IsNumeric() will never be true... Somewhere, your logic
is screwey... What are you trying to do (in english)?


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 15, 2007 3:12 PM
To: CF-Talk
Subject: Need some help with this Regex...

Hi, all...

Why doesn't this Regex validate the field entry "24"
as a valid number? :

<CFIF Len(Trim(Form.Years))
and Not IsNumeric(REReplace(Len(Trim(Form.Years)), "[0-9]","","All"))>

I thought this would mean:

If Form.Years has some content
and if, after taking away all digits 0 thru 9, what's left is not a
valid number, then...

Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272747
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to