Last active
August 29, 2015 14:11
-
-
Save eahrold/f7ae41558e379633dffe to your computer and use it in GitHub Desktop.
Version String Detection Regex
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
(\d+)\.(\d+)(\.(\d+))?(\.(\d+))?(?:(?:-(alpha\d*|beta\d*|rc\d*))?) | |
Will detect these formats | |
1.21.23 | |
1.21.23-rc | |
1.21.23-rc1 | |
2.21.23-alpha | |
1.211.233-beta12 | |
3.12 | |
1.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment