carapace, Is this a bug in Go's regexp package? This program should print false instead it prints true:
package main
import (
"fmt"
"regexp"
)func main() {
r := regexp.MustCompile("^1|0$")
fmt.Printf("%v\n", r.MatchString("00"))
}I checked against Python's re module and it works as expected:
>>> import re
>>> r = re.compile('^1|0$')
>>> print(r.match('00'))
None
Add comment