Community Patterns

Community Library Entry

0

Regular Expression
Created·2018-04-13 18:34
Flavor·Python

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
Open regex in editor

Description

Parses docker image tages into repository, name, and tag

Submitted by anonymous