SemVer Favorite

Matches SemVer (Semantic Versioning) strings.

The string MAY start with a "v" but it is not matched.

Sample Matches
Text Result
1.2.3
Group #0
1.2.3
major
1
minor
2
patch
3
match
1.2.3-pre
Group #0
1.2.3-pre
major
1
minor
2
patch
3
prerelease
pre
match
1.2.3+build
Group #0
1.2.3+build
major
1
minor
2
patch
3
build
build
match
1.2.3-pre+build
Group #0
1.2.3-pre+build
major
1
minor
2
patch
3
prerelease
pre
build
build
match
v1.2.3-pre+build
Group #0
1.2.3-pre+build
major
1
minor
2
patch
3
prerelease
pre
build
build
match
1.2no match
Match Groups
major
Major version number
minor
Minor version number
patch
Patch version number
prerelease
Prerelease version
build
Build metadata