fork download
  1. package main
  2.  
  3. import "fmt"
  4. import "regexp"
  5.  
  6. func main() {
  7. re := regexp.MustCompile("^a{1,1000000000}$")
  8. fmt.Println(re.MatchString("aaa"))
  9. }
Runtime error #stdin #stdout #stderr 0s 4480KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
panic: regexp: Compile(`^a{1,1000000000}$`): error parsing regexp: invalid repeat count: `{1,1000000000}`

goroutine 1 [running]:
panic(0x4b14e0, 0xc42000a280)
	/usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1
regexp.MustCompile(0x4d357a, 0x11, 0x0)
	/usr/lib/go-1.7/src/regexp/regexp.go:237 +0x17a
main.main()
	/home/Xo8rkX/prog.go:7 +0x3a