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

Comments

@rsc
Copy link
Contributor

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 commented May 8, 2012

Comment 1:

Started: http://golang.org/cl/6201063/

@robpike
Copy link
Contributor

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 pushed 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
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants