Arrrgh! RegEx is icky for this. If you can't use IsNaN(), this should work much better: function IsNumeric(input) { return (input - 0) == input && input.length > 0; } The <code>(input - 0)</code> forces the value to be interpreted as a number for the mathmatical op. Then the _numeric_ result is compared to the string you passed in (after all, if you passed in a number it should return <code>true</code> anyway). If they match, we have a winner. The check on the length is of course for the empty string special case. Note that it falls down on your 0x89f test, but that's because in many environments that's an okay way to define a number literal.