Created
April 13, 2017 10:04
-
-
Save niksudan/5cad09e351031a04b17d315b6dfc9716 to your computer and use it in GitHub Desktop.
Semver Regex
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
^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-([a-z]+))?(\.(?:0|[1-9]\d*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not a very useful regex, see:
https://regex101.com/r/bcq5Jd/1/
It's also a naive approach to the problem.