-
Notifications
You must be signed in to change notification settings - Fork 17.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regexp/syntax: panic: unhandled case in compile - x{2} #68067
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go version
go version go1.22.2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
panic: regexp: unhandled case in compile
This appears to be because
OpRepeat (17)
is not handled here. I based my implementation on this suggestion.Furthermore, using something like
regexp.MustCompile
causes no issue forx{2}
.What did you expect to see?
Successful Compilation
I'm not sure if this is intended behaviour and there's an alternative way to accomplish this, but I would think at the very least the documentation of
syntax.Compile
should include a possible panic.The text was updated successfully, but these errors were encountered: