Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?!nightly)((?<compatibility>\w*-?)?)(?<major>\d+)(\.(?<minor>\d+)(\.(?<patch>\d+)([\.-]?(?<build>.*)))?)?(?!nightly|developement|develop)$
/
gm
Input 1
New
100.200.300 100.200.300.7068-ls170 v100.200.300-ls213 version-100.200.300 version-100.200.300-ls180 version-100.200.300.11111 100.200.300.7068-ls170 nigthly-100.200.300 nightly-100.200.300.3604-ls587 100.200.300-development 100.200.300-develop 100.200.300-nigthly
Substitution
100.200.300 100.200.300.7068-ls170 v100.200.300-ls213 version-100.200.300 version-100.200.300-ls180 version-100.200.300.11111 100.200.300.7068-ls170 nigthly-100.200.300 nightly-100.200.300.3604-ls587 100.200.300-development 100.200.300-develop 100.200.300-nigthly