Re: [PATCH] grep -P: Fix matching ^ and $

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

 



On 02/25/2012 10:30 AM, Michał Kiedrowicz wrote:
Michał Kiedrowicz<michal.kiedrowicz@xxxxxxxxx>  wrote:

When `git-grep` is run with -P/--perl-regexp, it doesn't match ^ and $ at
the beginning/end of the line.  This is because PCRE normally matches ^
and $ at the beginning/end of the whole text, not for each line, and git-grep
firstly passes a large chunk of text (possibly containing many lines) to
pcre_exec() before it splits the text into lines.  This makes `git-grep -P`
behave differently from `git-grep -E` and also from `grep -P` and `pcregrep`:

Thanks! I can confirm that I now get the expected output.

Zbyszek

Original report:
http://permalink.gmane.org/gmane.comp.version-control.git/190830
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]