Can you show your Go code, including the failing test data? Using
https://go.dev/play/ is best.
Not all regular expression libraries are the same, and this table also includes some variations which are supported by other popular RE libraries, but *not* by re2.
Note in particular the section headed "Grouping", and the way you need to define named capture groups:
(?P<name>re)
named & numbered capturing group (submatch)
(?<name>re)
named & numbered capturing group (submatch) (NOT SUPPORTED)