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
Docker Image Tag Parsing
Open Workspace
Python
Match
Created 2018-04-13 18:34
0
Regular Expression
r"
^
(?P<repository>
[
\w
.
\-
_
]
+
(
(?:
:
\d
+
|)(?=
/
[
a
-
z0
-
9._-
]
+
/
[
a
-
z0
-
9._-
]
+
)
)
|)(?:
/
|)(?P<image>
[
a
-
z0
-
9.
\-
_
]
+
(?:
/
[
a
-
z0
-
9.
\-
_
]
+
|)
)(
:
(?P<tag>
[
\w
.
\-
_
]
{1,127}
)
|)
$
"
gmi
Description
Parses docker image tages into repository, name, and tag
Submitted by
Anonymous