hi i am trying to create my own isValidFloat function using a regalar expression but it isnt behaving how i would like and cannot work out what the problem is:
this is my float regaular expression <cfset var floatRegEx = "(?!^(\+|-)?[0-9][0-9]*(\.[0-9][0-9]*)$)"> <!--- allowable ---> i have used negative lookahead so that it will return me any point that isnt part of the regular expression, and therefore have the following code to test for an error: <cfset value = '10.00'> <cfif refindnocase(floatRegEx,value) neq (len(value)+1)> <cfreturn false> <cfelse> <cfreturn true> </cfif> but it is pointing to an error on position 2 but i cannot work out why as the criteria i thought i had set is (+ or - optional, following by a mandatory 0-9 number, followed by as many other numbers 0-9, then followed by a mandatory dot, followed by another mandatory number, then followed by as many other optional numbers at then end) thanks for any help richard ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313539 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

