multiple by 2, and check if it is a whole number? On Sat, Feb 20, 2010 at 1:41 AM, Marie Taylore <mt4yl...@yahoo.com> wrote:
> > I have an app that I need to validate that they enter either whole numbers > (1,2,3, etc.) or if they DO enter a decimal, it can only be in half > increments, so 2.5 is okay, but not 2.1, 2.2, 2.25, etc. Of course, 2.0 > would be okay too, so .0 after the number is fine. > > Is there a good way to check that with Regex rather than parsing the string > and checking that the value after the period is a 5 or a 0? > > Thanks, > > MarieT > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330977 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4