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: Replace out of range when submatch string is empty #3816

Closed
gopherbot opened this issue Jul 12, 2012 · 7 comments
Closed

regexp: Replace out of range when submatch string is empty #3816

gopherbot opened this issue Jul 12, 2012 · 7 comments
Assignees
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 12, 2012

by googollee:

go version go1.0.2

issue code: http://play.golang.org/p/0M5pVAfkY_

It ought to return a empty string if submatch nothing. But code will panic with
"slice bounds out of range". Please fix.

golang-nut mail thread:
https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/gB5n7GYhNTU
@robpike
Copy link
Contributor

@robpike robpike commented Jul 12, 2012

Comment 1:

Owner changed to @rsc.

Status changed to Accepted.

@robpike
Copy link
Contributor

@robpike robpike commented Jul 12, 2012

Comment 2:

Labels changed: added priority-soon, removed priority-triage.

@rsc
Copy link
Contributor

@rsc rsc commented Sep 12, 2012

Comment 4:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-m.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 10, 2012

Comment 6:

Labels changed: added suggested.

@gopherbot
Copy link
Author

@gopherbot gopherbot commented Dec 12, 2012

Comment 7 by alakriti:

I've submitted a patch for review to address this issue:
https://golang.org/cl/6931049
@rsc
Copy link
Contributor

@rsc rsc commented Dec 22, 2012

Comment 8:

This issue was closed by revision 54b7ccd.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@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
3 participants
You can’t perform that action at this time.