Find All Matches with Indexes in Go
package main
import (
"fmt"
"regexp"
)
func main() {
re := regexp.MustCompile(`a.`)
fmt.Println(re.FindAllStringIndex("paranormal", -1))
fmt.Println(re.FindAllStringIndex("paranormal", 2))
fmt.Println(re.FindAllStringIndex("graal", -1))
fmt.Println(re.FindAllStringIndex("none", -1))
}