On 06/15/2011 09:12 PM, Jim Meyering wrote:
However, backreferences force these tools to skip the DFA-based
optimization and resort to running the regexp code.  In that case,
there is a dichotomy.  Adding a backreference to a range-including
regexp would have the surprising consequence of changing how that range
is interpreted when the tool is built to use glibc's regexp code.

Thus, if we go this route, we are effectively saying
that people who want self-consistent regex-handling
in our tools must build with --with-included-regex or end
up causing subtle problems.

This is not true, the latest releases bail out not just for backreferences but also for ranges (MBCSETs). This was done for performance reasons, but also to avoid exactly this problem.

Paolo

Reply via email to