Aaron Crane wrote:
I'm not sure it's ideal to use the Perl documentation as a comprehensive guide to PCRE:
Unfortunately libpcre does not document the regular expression syntax it supports. Neither does the grep manual, for 'grep -P'. And as you've mentioned, the Perl manual isn't a reliable source for libpcre either. So users of 'grep -P' cannot rely on any documentation for behavior; it's an unwritten tradition instead.
Long ago when a friend told me "When you're telling someone else where you plan to throw the Frisbee, don't say anything more specific than 'Watch this!'" That's 'grep -P' in a nutshell.