Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Golang

`
(?P<Registry>[a-z0-9\-.]+\.[a-z0-9\-]+:?[0-9]*)?/?((?P<Name>[a-zA-Z0-9-_]+?)|(?P<UserName>[a-zA-Z0-9-_]+?)/(?P<ImageName>[a-zA-Z-_]+?))(:(?P<Tag>[a-zA-Z0-9-_\\.]+?)|)$
`
gm

Description

Used by me for docker-retagger

Submitted by Roman Minebaev - 3 years ago