Program:
package main
import "regexp"
var r = regexp.MustCompile(`\p{Canadian_Aboriginal}`)
func main() {}
Output:
panic: regexp: Compile(`\p{Canadian_Aboriginal}`): error parsing regexp: invalid character class range: `\p{Canadian_Aboriginal}`
goroutine 1 [running]:
regexp.MustCompile({0x4b1f10, 0x17})
/usr/local/go-faketime/src/regexp/regexp.go:313 +0xb4
main.init()
/tmp/sandbox2354615464/prog.go:5 +0x1f
This was a program that compiled and ran on Go 1.24, but does not on any later version. The implementation of #70781 canonicalizes all strings within \p{} brackets before lookup. This causes selection of unicode scripts that contain underscores to no longer match.
Program:
Output:
This was a program that compiled and ran on Go 1.24, but does not on any later version. The implementation of #70781 canonicalizes all strings within
\p{}brackets before lookup. This causes selection of unicode scripts that contain underscores to no longer match.