Yeah, `regexp` is based on RE2 and doesn't have multiline mode on by default. Here's another implementation:

```go
	re := regexp.MustCompile(`(?m)^staff:.*?:([0-9]+)`)
	if gidMatch := re.FindSubmatch(groups); gidMatch != nil {
		gid, err := strconv.Atoi(string(gidMatch[1]))
```