With reference of this Q&A on AU.
Why behavior of GNU grep
using -Pz
parameters changed and doesn't support start of line ^
and $
end of line anchors?
Is this a bug or correct behavior?
Tested on Ubuntu 16.04 with kernel version 4.4.0-21-generic.
$ echo ^ | grep -Pz ^
grep: unescaped ^ or $ not supported with -Pz