Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Regular expression for matching a number with optional decimals, with "." or "," as comma-separator. The number can be signed or unsigned.
/^\-?[0-9]+([\.|\,]{1}[0-9]{1,2})?$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.