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
Parsing result of SQL Server version (SELECT @@VERSION)
Open Workspace
.NET 10.0 (C#)
Match
Created 2023-02-15 21:12
-2
Regular Expression
@"
(
\d
{4}
)
.
(
\(
.
*?
\)
)
.
(?:
\(
.
*
\)
)
.
-
.
(
\d
+
\.
)?(
\d
+
\.
)?(
\d
+
\.
)?(
\*
|
\d
+
)(?:
.
*?
)(?:
(
\w
+
)
.
Edition
)(?:
.
*?
)(?:
Windows
.
(
\w
+
.\d
+
.\w
+
)
)
"
gm
Description
Parses MS SQL Server version returned from executing SELECT @@version
Submitted by
M Rivas