Is there a way in Go Regex if I have (a)|(b) to start groups for b also with 0 ? how would I do that?
re := regexp.MustCompile(
`<(\$)([a-zA-Z0-9]+):([a-zA-Z0-9]+):([a-zA-Z0-9]+)>|{(@)([a-zA-Z0-9 ]+)}`)
and iterate over with
for _, v := range re.FindAllSubmatchIndex([]byte(str), -1) {
...
}
How do I "normalize" groups (indexes)? so the (@) is also group 0?
Can i use groupnames with the same names?