Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?P<release>(?:0|[1-9])\d*(?:\.(?:0|[1-9]\d*)){2})(?:-(?P<pre>(?P<prel>a|b|rc)(?P<pren>(?:0|[1-9])\d*)))?(?:\+(?P<local>[a-z\d]+(?:[-_\.][a-z\d]+)*))?
/
gm
Test String
New
Valid PEP440 Verions Final versions 0.9 0.9.1 0.9.2 0.9.10 0.9.11 1.0.1 2.0.1 Version epochs 1.0 1.1 2.0 2013.10 2014.04 2013.10 2014.04 1!1.0 1!1.1 1!2.0 Examples of compliant version schemes Simple "major.minor" versioning: 0.1 0.2 0.3 1.0 1.1 Simple "major.minor.micro" versioning: 1.1.0 1.1.1 1.1.2 1.2.0 "major.minor" versioning with alpha, beta and candidate pre-releases: 0.9 1.0-a1 1.0-a2 1.0.7-b1 1.0.34-rc1 1.0 1.1.0-a1 "major.minor" versioning with developmental releases, release candidates and post-releases for minor corrections: 0.9 1.0.dev1 1.0.dev2 1.0.dev3 1.0.dev4 1.0c1 1.0c2 1.0 1.0.post1 1.1.dev1 Date based releases, using an incrementing serial within each year, skipping zero: 2012.1 2012.2 2012.3 2012.15 2013.1 2013.2 The following example covers many of the possible combinations: 1.0.dev456 1.0a1 1.0a2.dev456 1.0a12.dev456 1.0a12 1.0b1.dev456 1.0b2 1.0b2.post345.dev456 1.0b2.post345 1.0rc1.dev456 1.0rc1 1.0 1.0+abc.5 1.0+abc.7 1.0+5 1.0.post456.dev34 1.0.post456 1.1.dev1
Extraction
Processing...