The support for named capture groups in Go&#x27;s regular expressions is severely lacking, in the sense that it may as well not even exist. There&#x27;s an API (SubexpNames) that returns an ordered list of the capture group names (if you provided them), but it&#x27;s up to the user to implement some scheme for mapping a name to the contents of a capture group. At that point, it&#x27;s probably going to be easier to just use the capture group indices.