Created
May 17, 2013 15:42
-
-
Save kentcdodds/5599909 to your computer and use it in GitHub Desktop.
Common regex tests. I'll just put them here so I can easily copy them later when I don't want to make my brain figure it out again.
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 isValidInt = function(str) { | |
var regex = /^\d+$/; | |
return regex.test(str); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment