>There's probably a more elegant way using a NOT operator in RegEX, ReReplaceNoCase(numvalue,"[^0-9]+","","ALL")
man pages :) -----Original Message----- From: Joshua Miller [mailto:josh@;joshuasmiller.com] Sent: Wednesday, November 13, 2002 1:54 PM To: CF-Talk Subject: RE: commas in numeric fields... Why not do something like: #ReReplaceNoCase(numvalue,"[[:punct:]]|[[:space:]]|[[:alpha:]]","","ALL" )# That will strip everything that's NOT numeric. There's probably a more elegant way using a NOT operator in RegEX, but I'm not the RegEX wiz. That said, anyone know of a good RegEX book? Joshua Miller [EMAIL PROTECTED] -----Original Message----- From: Jann VanOver [mailto:techinfo@;DragonflyGirl.com] Sent: Wednesday, November 13, 2002 4:37 PM To: CF-Talk Subject: Re: commas in numeric fields... BBEdit has a GREAT file/directory compare feature. But if you work on a Mac, you already use BBEdit, I'm sure. On 11/12/02 6:12 PM, "Ed Gordon " <[EMAIL PROTECTED]> wrote: > What do you do to display commas in numeric CFINPUT (editable) fields > with values over 999? > > For one client, I tried to validate numeric to avoid crashing the MS > Access database by using > > <CFINPUTs > > > with... > > validate=integer > or > validate=float > > but when I used #DecimalFormat(oldvalue.table)# or > #DecimalFormat(oldvalue.table)# to display it in the value= > clause of the field, the program would crash the minute they tried to update > with the commas still in the numeric fields. > > So, removed any field validation, and simply scanned for leading > dollar sign and embedded commas which I removed. Elegant, but now the > user is not stopped by the edit built into CFINPUT to check for > numeric - therefore, if they slip and put in a character (say, an OH > for a ZERO), SQL bombs . > > What do you do for numerics over 999? > > - TIA > > Ed Gordon > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.