URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=16092>
Summary: grep -P match error
Project: grep
Submitted by: None
Submitted on: Tue 03/14/06 at 22:37
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
winxp pro w/ sp2, gnu grep 2.5.1a with pcre 5.0 (per dependencies package):
cat | grep -P "(?<=2 ).*$"
with input lines:
2 should match
3 shouldn't match
^Z
doesn't match line "2 should match" while it should.
Identical input fed to pcregrep from gnu-win32 package pcre version 6.1 with
pcre3.dll 6.1 works OK, i.e. line "2 should match" is matched.
Incidentally, I need to use -P -o (output matched pattern only), in which
case I expect the output to be "should match", that is the "2 " positive
look-behind should be discarded from the output match.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=16092>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/