Skip to content

Instantly share code, notes, and snippets.

@nolan
Created January 30, 2015 21:11
Show Gist options
  • Save nolan/55ef3bfad57cf5f9ec64 to your computer and use it in GitHub Desktop.
Save nolan/55ef3bfad57cf5f9ec64 to your computer and use it in GitHub Desktop.
currency regex
/^\$?\-?([1-9]{1}[0-9]{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))$|^\-?\$?([1-9]{1}\d{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))$|^\(\$?([1-9]{1}\d{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))\)$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment