Re: [pcre-dev] Return last bumpalong offset in partial_hard …

Αρχική Σελίδα
Delete this message
Συντάκτης: Zoltán Herczeg
Ημερομηνία:  
Προς: pcre-dev
Αντικείμενο: Re: [pcre-dev] Return last bumpalong offset in partial_hard matching
> Just to make sure I understand what you are suggesting: instead of
> returning the earliest character that was inspected, you want it to
> return the starting point of the last match attempt. Is that right? I
> presume you then expect to use that offset minus the max lookbehind to
> discover what characters to keep. Is that right?


Just my two cents: we did incompatible changes before such as removing pcre_info, or disallowing 0xD800-0xDFFF range in UTF character sets. After these changes people needed to fix their software (Apache or PHP), and they did it and moved on. We never actually removed a feature, just reworked it.

The original behavior was always odd to me, because it depends on the current subject. I feel that is not exactly consistent. After this change the matching code will be less complex (a little faster and more maintainable), and I think the use cases will not even change because ovector[0]-max_lookbehind character must be kept even now.

Regards,
Zoltan