bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dealing with character ranges in grep


From: Paolo Bonzini
Subject: Re: Dealing with character ranges in grep
Date: Mon, 27 Jun 2011 15:01:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10

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

[Prev in Thread] Current Thread [Next in Thread]