Stephane Chazelas wrote:
$ time grep -Pz '(?-m)^/' ~/a > /dev/null

It looks like you want "^" to stand for a newline character, not the start of a line. That is not how grep -z works. -z causes the null byte to be the line delimiter, and "^" should stand for a position immediately after a null byte (or at start of file).

It might be nice to have a syntax for matching a newline byte with -z (or a null byte without -z, for that matter). But that would be a new feature.



Reply via email to