diff options
author | Reuben Thomas <rrt@sc3d.org> | 2010-03-05 23:47:43 +0000 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-03-06 08:39:30 +0100 |
commit | 9ecf17742ffe69de7ed8e96bbf3ecabccef12c75 (patch) | |
tree | bbfa9647bc41f44c800ed62915a88a1fbf38d883 /doc | |
parent | a5eb27b3e3576aff4945f9edae469eab37606783 (diff) | |
download | grep-9ecf17742ffe69de7ed8e96bbf3ecabccef12c75.tar.gz |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/grep.1 | 12 | ||||
-rw-r--r-- | doc/grep.texi | 10 |
2 files changed, 15 insertions, 7 deletions
@@ -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 6a238bec..c2a494d1 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:: |