[go-nuts] regexp question
Dear all, What happens if a group in a regular expression matches repeatedly, via the * operator? Experimentally I found that FindStringSubmatch then returns the text of the last match. Is this guaranteed somewhere (I didn't find anything about this on https://pkg.go.dev/regexp )? Also, is t
[go-nuts] Regexp question
This code (A) package main import ( "fmt" "regexp" ) func main() { fmt.Printf("%v", regexp.MustCompile(`a*`).FindAllStringIndex(`baaab`, -1)) } (https://play.golang.org/p/WeyStT0Gbn) Produces [[0 0