Not to mention isNumeric() in J's post is ... well, illegal.  It already 
exist in CF and it'll throw an error.  Heh, to bad we can overwrite those 
functions like you can in flash. ;)

~Todd

On Thu, 1 Aug 2002, Michael Dinowitz wrote:

> Well, he asked for RegEx and I gave him RegEx. The IsNumeric is better but I got 
>directly into teaching mode. :)
> 
> 
> > > Try this:
> > > ^[0-9]+$
> > > A string must start (^) with a number ([0-9]), at least one number must
> > > exist (+) and the string ends after one or more numbers ($).
> > 
> > 
> > Oooh oooh! ...
> > 
> > function IsNumeric(string) {
> > return yesnoformat(REFind("^[0-9]$",string));
> > }
> > 
> > isnumeric("3") = yes
> > usnumeric("3,000") = no
> > 
> > Wow that would be useful... How come on one's thought of that before? :)
> > 
> > Sorry Mike... just poking a little geeky fun at your expense. :)
> > 
> > Although actually, if the field is supposed to be numeric you can make it a
> > little easier on some of the slower ( mentally ) users by eliminate dollar
> > signs, commas and decimals which are common formatting elements for money
> > values... which can be done with regex, although I think I would probably
> > wind up using replacelist
> > 
> > 
> > Isaac Dealey
> > Certified Advanced ColdFusion Developer
> > 
> > www.turnkey.to
> > 954-776-0046
> > 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to