Test, validate and match regular expressions
Parses Docker-style image references line by line, capturing an optional registry domain with an optional port (e.g. 'registry.example.com:5000' or 'my-registry.io') in group 1, and the remaining image path/repository/tag in group 2. The optional slash separator and case-insensitive matching make it robust for splitting container image strings into host and image components. Used in Zarf (a Go tool) to extract registry hosts from full image references.