Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Semantic versioning
Open Workspace
PCRE (Legacy)
Match
Created 2018-05-31 07:44
0
Regular Expression
/
^
(?!
.
*
\-
{2}
.
*
)(?!
.
*
\+
{2}
.
*
)(?!
.
*
\.
{2}
.
*
)(?P<major>
(?!
0
)(
\d
*
)
|
(
[
0[^
\d
]
)
)(
(?>
\.
)(?P<minor>
\g<1>
)
)
\.
(?P<patch>
\g<minor>
)(?!
[
\+\-
]
[^
a
-
zA
-
Z0
-
9
]
)(
\g<2>
(
\-
(?P<release>
[
a
-
zA
-
Z0
-
9
\.
-
]
+
)
)
)?(
\+
(?P<build>
\g<9>
)
)?
$
/
gm
Description
For semantic version validation / parsing.
Submitted by
Daniel R. Azulay <d.r.azulay@gmail.com>