Skip to content
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: internal error parsing regexp #3406

rsc opened this issue Mar 27, 2012 · 2 comments

regexp: internal error parsing regexp #3406

rsc opened this issue Mar 27, 2012 · 2 comments


Copy link

@rsc rsc commented Mar 27, 2012

Too late for Go 1.

package main
import "regexp"
var goTag = regexp.MustCompile(`^go(\.(0|[1-9][0-9]{,3}))*\.([1-9][0-9]{,3}))$`)
func main() {}

panic: regexp: Compile(`^go(\.(0|[1-9][0-9]{,3}))*\.([1-9][0-9]{,3}))$`): error parsing
regexp: regexp/syntax: internal error: ``

goroutine 1 [running]:
regexp.MustCompile(0x455e74, 0x286f675e0000002e, 0x0, 0x40a4af, 0x1, ...)
    go/src/pkg/regexp/regexp.go:197 +0x132
    /tmpfs/gosandbox-454d834b_e6204b4b_3cffe81e_f63dfc20_02f4ec89/prog.go:5 +0x58
Copy link

@cznic cznic commented May 8, 2012

Comment 1:

Copy link

@robpike robpike commented May 14, 2012

Comment 2:

This issue was closed by revision bd13f6f.

Status changed to Fixed.

@rsc rsc added fixed labels May 14, 2012
@rsc rsc self-assigned this May 14, 2012
robpike added a commit that referenced this issue May 11, 2015
…ted ) w/ ErrUnexpectedParen

««« backport 27d0a516b7eb
regexp/syntax: replace internal error on unexpected ) w/ ErrUnexpectedParen

Unbalanced extra right parenthesis produced an internal error instead of
a more descriptive one.

Fixes #3406.

R=r, rsc

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants