You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 for x{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:
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
bogdan-deac
changed the title
regexp/syntax: panic: unhandled case in compile - OpRepeat (17)
regexp/syntax: panic: unhandled case in compile - x{2}
Jun 19, 2024
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: