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 #92

Closed
EricEdens opened this issue Aug 14, 2019 · 0 comments · Fixed by #108
Closed

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

EricEdens opened this issue Aug 14, 2019 · 0 comments · Fixed by #108
Assignees

Comments

@EricEdens
Copy link
Contributor

From golang/go#11187:

regexp/syntax: fix handling of \Q...\E

It's not a group: must handle the inside as a sequence of literal chars,
not a single literal string.

That is, \Qab\E+ is the same as ab+, not (ab)+.

Repro:

@sjamesr sjamesr self-assigned this Jun 3, 2020
sjamesr added a commit to sjamesr/re2j that referenced this issue Jun 3, 2020
Ports the fix of golang/go#11187 to RE2/J. The
contents of a \Q...\E sequence is now treated as a sequence of literal
chars, not a single literal string.

Fixes google#92.
sjamesr added a commit to sjamesr/re2j that referenced this issue Jun 3, 2020
Ports the fix of golang/go#11187 to RE2/J. The
contents of a \Q...\E sequence is now treated as a sequence of literal
chars, not a single literal string.

Fixes google#92.
sjamesr added a commit to sjamesr/re2j that referenced this issue Jun 3, 2020
Ports the fix of golang/go#11187 to RE2/J. The
contents of a \Q...\E sequence is now treated as a sequence of literal
chars, not a single literal string.

Fixes google#92.
sjamesr added a commit that referenced this issue Jun 3, 2020
Ports the fix of golang/go#11187 to RE2/J. The
contents of a \Q...\E sequence is now treated as a sequence of literal
chars, not a single literal string.

Fixes #92.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants