The title is misleading, that feature is a JavaScript thing:
/(?:(a)b|\1)+/ matches aba in Perl, but not in JavaScript.
Anyway it looks like the problem here is ()? clears the capturing bracket in
Perl when the empty case is selected while restores its previous value in PCRE2.
Matching
Here is pcretest listing:
PCRE2 version 10.35 2020-05-09
/(?:(a)?\1)+/
aaa
0: aaa
Expected result:
0: aa
Perl result:
0: aa
--
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev
https://bugs.exim.org/show_bug.cgi?id=2764
Zoltan Herczeg changed:
What|Removed |Added
CC||hzmes...@freemail.hu
--- Comment #2 from
https://bugs.exim.org/show_bug.cgi?id=2764
Giuseppe D'Angelo changed:
What|Removed |Added
CC||dange...@gmail.com
--- Comment #1 from
https://bugs.exim.org/show_bug.cgi?id=2764
Bug ID: 2764
Summary: Regression in JIT matching with ^
Product: PCRE
Version: 10.37 (PCRE2)
Hardware: x86-64
OS: MacOS X
Status: NEW
Severity: bug
https://bugs.exim.org/show_bug.cgi?id=2762
Zoltan Herczeg changed:
What|Removed |Added
CC||hzmes...@freemail.hu
--- Comment #3 from