bug-grep
[Top][All Lists]
Advanced

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

[bug #27669] issue using ^ with -z


From: Paolo Bonzini
Subject: [bug #27669] issue using ^ with -z
Date: Tue, 28 Jun 2011 09:22:49 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

Update of bug #27669 (project grep):

                  Status:                    None => In Progress            

    _______________________________________________________

Follow-up Comment #2:

This looks like it was fixed recently, but only in the case when the DFA
matcher is used:

$ perl -e '@a=qw/abc def ghi/; foreach(@a){print "$_n "}' | grep -z ^d[e-g]f 
$ perl -e '@a=qw/abc def ghi/; foreach(@a){print "$_n "}' | grep -z ^def 
def

For glibc we would probably need a new syntax bit, RE_NULL_NEWLINE.

While doing that, and for the sake of consistency, I'm also tempted to make ^
and $ match newlines in the middle of the NULL-separated record; ` and ' would
still be available to match beginning and ending of record.  This is a partial
patch that implements this in dfa.c.

(file #23580)
    _______________________________________________________

Additional Item Attachment:

File name: p1.patch                       Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27669>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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