Skip to content

Instantly share code, notes, and snippets.

@welefen
Created January 20, 2014 08:39
Show Gist options
  • Save welefen/8516854 to your computer and use it in GitHub Desktop.
Save welefen/8516854 to your computer and use it in GitHub Desktop.
判断是否是数字的正则
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