Hi eggie
eggie5 schrieb:
> How would I check if a string is a number?
Please use the prototype-user ml for these questions. By the way, this
question is not even prototype-related - you can do this simply with
native JS-Functions:
"01122302".match("/[^0-9]/g") => true
"0.23232".match("/[^0-9]/g") => false
"0.23232".match("/[^0-9.,]/g") => true
"abc".match("/[^0-9]/g") => false
Greetings
Frederic
--
Frederic Gaus pgp-key: 93E6903C
fingerprint: 0C55 4517 CC1E 5F7F 9059 3535 AB54 D8E8 93E6 903C
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---