buggrep - Bugs: bug #17492, BRE with caret in the middle of...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17492: BRE with caret in the middle of pattern doesn't match

Submitted by:  None
Submitted on:  Mon 21 Aug 2006 05:59:48 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 22 Dec 2009 09:08:17 AM UTC, comment #2:

Thank you for the bug report. This bug has been fixed in CVS and
in grep-2.5.4. You may download the latest release from:

ftp://ftp.gnu.org/gnu/grep/

Paolo Bonzini <bonzini>
Mon 21 Aug 2006 10:46:03 PM UTC, comment #1:

Thanks for reporting. This appears to be fixed in CVS:

$ echo "xxx^xxx" >file
$ grep xx^x file
xxx^xxx

$ grep --version | head -1
GNU grep 2.5.1-cvs

Benno Schulenberg <bens>
Mon 21 Aug 2006 05:59:48 PM UTC, original submission:

When I call
grep xx^x
it does not find lines containing "xx^x". Since the caret is not the first character of the pattern, it should match a literal caret as opposed to the beginning of a line (anchor).

It seems to work if you do the following:
grep .x^x

I tried grep xx^x on a solaris box and it works there.
A workaround for GNU grep seems to be
grep xx\^x

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Dec 2009 09:08:17 AM UTCbonziniStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1