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: considers "\Q\E*" as valid regexp #11187

Closed
dvyukov opened this issue Jun 12, 2015 · 4 comments
Closed

regexp: considers "\Q\E*" as valid regexp #11187

dvyukov opened this issue Jun 12, 2015 · 4 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jun 12, 2015

Regexp package successfully compiles "\Q\E_", while re2 says:
re2/re2.cc:202: Error parsing '\Q\E_': no argument for repetition operator: *

Who is right here? What is the reason for difference?

go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64

@dvyukov
Copy link
Member Author

dvyukov commented Jun 12, 2015

Similar case is "\Q\E{2}"

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jun 12, 2015
@rsc
Copy link
Contributor

rsc commented Oct 14, 2015

Perl and RE2 both reject \Q\E*, so I suppose Go should too, although I don't see how it is really different from (?:)*.

@rsc
Copy link
Contributor

rsc commented Nov 5, 2015

Now I see it. (?:) is a group.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/17233 mentions this issue.

@rsc rsc closed this as completed in 0680e9c Dec 1, 2015
@golang golang locked and limited conversation to collaborators Dec 1, 2016
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