Created
January 20, 2014 08:39
-
-
Save welefen/8516854 to your computer and use it in GitHub Desktop.
判断是否是数字的正则
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numberReg = /^((\d*\.?\d*(?:e[+-]?\d*(?:\d?\.?|\.?\d?)\d*)?)|(0[0-7]+)|(0x[0-9a-f]+))$/i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment