A regexp for this seems like overkill.

```go
if i := strings.Index(s, ":"); i != -1 {
  name, rest := s[:i], s[i:]
  if j := strings.Index(name, "."); j != -1 {
    pre, post := resolve(name[:j])
    return pre + name + post + rest
  }
}
return s
```