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 Version
Open Workspace
PCRE2 (PHP)
Match
Created 2023-03-08 17:24
0
Regular Expression
/
(?<Semantic>
(?<Major>
[
0
-
9
]
+
)
\.
(?<Minor>
[
0
-
9
]
+
)(?:
\.
(?=
[
0
-
9
]
)
)?(?<Maintenance>
[
0
-
9
]
+
)?(?:
\.
(?=
[
0
-
9
]
)
)?(?<Patch>
[
0
-
9
]
+
)?
)(?<Label>
(?:
(?:
\.
|
\-
|
\+
)?
\w
+
)+
)?
/
gm
Description
Matches and groups categories of semantic versions.
Submitted by
Jon Stinnett