Reuben Thomas wrote: > I attach a patch for grep.1 and grep.texi which improves the discussion of > PCRE.
Thanks. Applied, as below. In the future, please include full git format-patch output, or send with git send-email, including a ChangeLog-style-with-discussion-when-appropriate commit log. > I notice that grep.texi now uses year ranges in its copyright notice. > I am confused, because I thought this was discouraged. Has thinking > changed on this? I've always seen obvious value in using ranges, and decreased value in writing them out. Arguments to the contrary? I could try claiming amnesia or even Alzheimer's ;-) >From 9ecf17742ffe69de7ed8e96bbf3ecabccef12c75 Mon Sep 17 00:00:00 2001 From: Reuben Thomas <[email protected]> Date: Fri, 5 Mar 2010 23:47:43 +0000 Subject: [PATCH] doc: improve the discussion of PCRE * doc/grep.1: Add a sentence about Perl regular expressions, and point to pcresyntax(3) and pcrepattern(3). * doc/grep.texi: Likewise. --- doc/grep.1 | 12 ++++++++---- doc/grep.texi | 10 +++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/grep.1 b/doc/grep.1 index c0ea754..e990272 100644 --- a/doc/grep.1 +++ b/doc/grep.1 @@ -595,13 +595,17 @@ Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions. .PP .B grep -understands two different versions of regular expression syntax: -\*(lqbasic\*(rq and \*(lqextended.\*(rq In +understands three different versions of regular expression syntax: +\*(lqbasic,\*(rq \*(lqextended\*(rq and \*(lqperl.\*(rq In .RB "\s-1GNU\s0\ " grep , -there is no difference in available functionality using either syntax. +there is no difference in available functionality between basic and +extended syntaxes. In other implementations, basic regular expressions are less powerful. The following description applies to extended regular expressions; differences for basic regular expressions are summarized afterwards. +Perl regular expressions give additional functionality, and are +documented in pcresyntax(3) and pcrepattern(3), but may not be +available on every system. .PP The fundamental building blocks are the regular expressions that match a single character. @@ -1210,7 +1214,7 @@ Back-references are very slow, and may require exponential time. awk(1), cmp(1), diff(1), find(1), gzip(1), perl(1), sed(1), sort(1), xargs(1), zgrep(1), mmap(2), read(2), -pcre(3), pcrepattern(3), +pcre(3), pcresyntax(3), pcrepattern(3), terminfo(5), glob(7), regex(7). .SS "\s-1POSIX\s0 Programmer's Manual Page" diff --git a/doc/grep.texi b/doc/grep.texi index 6a238be..c2a494d 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1045,13 +1045,17 @@ A @dfn{regular expression} is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions. @command{grep} understands -two different versions of regular expression syntax: -``basic''(BRE) and ``extended''(ERE). +three different versions of regular expression syntax: +``basic,'' (BRE) ``extended'' (ERE) and ``perl''. In @sc{gnu} @command{grep}, -there is no difference in available functionality using either syntax. +there is no difference in available functionality between basic and +extended syntaxes. In other implementations, basic regular expressions are less powerful. The following description applies to extended regular expressions; differences for basic regular expressions are summarized afterwards. +Perl regular expressions give additional functionality, and are +documented in pcresyntax(3) and pcrepattern(3), but may not be +available on every system. @menu * Fundamental Structure:: -- 1.7.0.1.300.gd855a
