This is a Python RE for matching different parts and combinations of various docker/container image references, as compatible with docker pull etc.
Parts / Capture Groups
image: # whole image
repo: # everything but the tag/digest
registry: # host+port
host:
port:
name: # path within registry
reference: # tag or digest (with : or @; I haven't bothered to figure out how to strip that yet)
tag:
digest:
If it matches, it should match image, repo, and name at the very least.