[Javascript] RegExp

Hassan Schroeder hassan at webtuitive.com
Thu Jul 24 09:41:52 CDT 2003


Dan Costea wrote:

>  /^\d{1,3}$/ doesn't match 251,9 but I added (\,\d*)?), resulting: var oReg
> = /^(\d{1,3}(\,\d*)?)$/ and now it works OK!

>>>How should I modify it to match a positiv float between 0 and 999? (for
>>>example, to match: 125 or 251,9 or 5).

? Sorry, I read that as `125 or 251 or 9 or 5` -- how is "251,9" a
float between 0 and 999?

Disclaimer: I am no mathematician :-)
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the Javascript mailing list