[pcre-dev] [Bug 2495] Captures made in a lookaround inside a…

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 2495] Captures made in a lookaround inside a loop are not rolled back when backtracking
https://bugs.exim.org/show_bug.cgi?id=2495

David Ellsworth <davidell@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |FIXED


--- Comment #2 from David Ellsworth <davidell@???> ---
Thanks for your quick reply, Philip!

I suspected it was just as you say: that it required major refactoring, and
that a big part of the reason for PCRE2 existing in the first place was to fix
bugs like this. I'm on the same page; PCRE2 is so much better, and I want
everybody to switch to it from PCRE.

Unfortunately some software obstinately still uses PCRE, most notably
https://regex101.com/. And some people are obstinately "loyal" to PCRE as a
result. But I accept that this bug is a wontfix (and expected it).

In an effort to show people how great PCRE2 is, I've made a "Try It Online" for
testing PCRE2 conditional replacement: https://bit.ly/36ax6nh

I've actually wanted to communicate with you for a long time. I've written my
own regex engine with full ECMAScript compatibility, optional emulating of
other engines (many parts of PCRE, so far), toggling of behaviors (like PCRE2's
PCRE2_MATCH_UNSET_BACKREF, and ECMAScript's behavior with zero-width optional
matches), and optional non-atomic lookahead:
https://github.com/Davidebyzero/RegexMathEngine
I originally designed this with no plan to give it non-ECMAScript-style
persistent captures (which keep their value from one iteration of a loop to the
next), and retrofitting this feature in was very difficult. It mostly works
now, but still has at least one bug:
https://github.com/Davidebyzero/RegexMathEngine/issues/3
So I somewhat understand what it must've been like to do such a major
refactoring for PCRE2. I've put on hold adding further features (subroutines,
lookbehind, etc.) until I fix the standing bugs.

I have some other things to bring up, regarding PCRE2, but I will leave that
for another thread - don't want to go too far off-topic here.

I do notice that in that thread for #1887 you said, "I am a bit surprised
nobody has noticed before." Well now you know, somebody noticed two and a half
years earlier! :-)

BTW, I have not used Bugzilla before (except to read a few bug reports,
occasionally over the years) and did not realize that the default Search
function (in a basic one-line text box present in all pages) only searches Open
issues, and that I actually have to click the Search link (not the button), or
"Edit this search" after a search is done, to get control over searching All
issues. I actually did search for variations of the word "capture", "backref",
and "backtrack" together, but it was only searching Open issues and thus didn't
find anything. I suppose in the back of my mind I thought it might only be
searching open issues, but I also really wanted to report this bug.

--
You are receiving this mail because:
You are on the CC list for the bug.