You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)+.
Test output is parse/dump of \Qab\E+ expected cat{lit{a}plus{lit{b}}}, got plus{str{ab}} expected:<[cat{lit{a}plus{lit{b}]}}> but was:<[plus{str{ab]}}>
The text was updated successfully, but these errors were encountered:
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.
Fixesgoogle#92.
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.
Fixesgoogle#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.
Fixesgoogle#92.
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.
From golang/go#11187:
Repro:
{"\\Qab\\E+", "cat{lit{a}plus{lit{b}}}"},
to https://github.com/google/re2j/blob/master/javatests/com/google/re2j/ParserTest.java#L88parse/dump of \Qab\E+ expected cat{lit{a}plus{lit{b}}}, got plus{str{ab}} expected:<[cat{lit{a}plus{lit{b}]}}> but was:<[plus{str{ab]}}>
The text was updated successfully, but these errors were encountered: