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

Closed
rsc opened this issue Mar 27, 2012 · 2 comments
Closed

regexp: internal error parsing regexp #3406

rsc opened this issue Mar 27, 2012 · 2 comments
Assignees

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Mar 27, 2012

Too late for Go 1.

http://play.golang.org/p/VsKkqRqr2U

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
main.init()
    /tmpfs/gosandbox-454d834b_e6204b4b_3cffe81e_f63dfc20_02f4ec89/prog.go:5 +0x58
@cznic
Copy link
Contributor

@cznic cznic commented May 8, 2012

Comment 1:

Started: http://golang.org/cl/6201063/
@robpike
Copy link
Contributor

@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
CC=golang-dev
https://golang.org/cl/6201063

»»»
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.