Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
regexp: FindAllStringIndex doesn't return overlapping matches #7643
What does 'go version' print? go version go1.2 darwin/amd64 What steps reproduce the problem? http://play.golang.org/p/bcm1BeQ9r2 re := regexp.MustCompile("aaa") fmt.Println(re.FindAllStringIndex("aaaaa", -1)) What happened? program printed [[0 3]] What should have happened instead? expected output: [[0 3], [1 4], [2 5]] Please provide any additional information below. Even if this behavior is expected (which is somewhat counter-intuitive), it should be documented at http://golang.org/pkg/regexp/#Regexp.FindAllStringIndex