bug-grep
[Top][All Lists]
Advanced

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

[bug-grep] [bug #9519] echo do^re | grep do^re; fails while grep -i do^


From: Julian Foad
Subject: [bug-grep] [bug #9519] echo do^re | grep do^re; fails while grep -i do^re succeeds
Date: Mon, 11 Apr 2005 22:27:12 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217

Follow-up Comment #1, bug #9519 (project grep):

Clarification:

With grep v2.5.1, "echo do^re | grep do^re" finds no match, which is wrong,
and "echo do^re | grep -i do^re" finds "do^re", which is correct.

The correct behaviour is to find a match, since plain "grep" has
context-sensitive anchors: '^' is only special at the beginning of an RE or
after a special '(' or '|'.

In contrast, "egrep" has context-independent anchors, so "echo do^re | egrep
do^re" and "echo do^re | egrep -i do^re" should not find a match, and indeed
they don't.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9519>

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





reply via email to

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