Created
March 2, 2018 07:51
-
-
Save sjy/86b71920faf15dfdc922f59f911c8559 to your computer and use it in GitHub Desktop.
Valid Digit Number Pattern
This file contains hidden or 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
const pattern = /^[1-9]\d{0,4}(\.\d{0,2})?$|^0(\.\d{0,2})?$/; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment