[Javascript] RegExp

Hassan Schroeder hassan at webtuitive.com
Thu Jul 24 10:17:08 CDT 2003


Before the coffee fully took effect, I wrote:

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

float, not integer, OK, yeah -- sorry 'bout that :-)

Sigh. I'd still think that something like

   var thisNum = parseFloat(targetString);
   if (( thisNum <= 999 ) && ( thisNum >= 0 )) { // do something }

would be preferable, if only to eliminate locale issues like using
"," instead of "." ...

FWIW!
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the Javascript mailing list