Package: grep
Version: 2.5.4-4
Followup-For: Bug #203109
I think this bug was kept open because of the lack of -P support in
Debian grep, but that has now been fixed.
However, the original man page patch made two other useful contributions
which in some form are still needed:
1. It mentioned Perl regexps in the REGULAR EXPRESSIONS section of the
documentation.
2. It explained that Perl regexs are not documented in the man page
(however, it did this in a rather negative way, whereas it should simply
point to the PCRE documentation).
I attach a new patch to the man page and info manual to fix this.
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages grep depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
grep recommends no packages.
grep suggests no packages.
-- no debconf information
? mdate-sh
? texinfo.tex
Index: grep.1
===================================================================
RCS file: /sources/grep/grep/doc/grep.1,v
retrieving revision 1.39
diff -u -r1.39 grep.1
--- grep.1 7 Feb 2008 03:43:27 -0000 1.39
+++ grep.1 8 May 2009 12:19:50 -0000
@@ -595,13 +595,17 @@
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 @@
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"
Index: grep.texi
===================================================================
RCS file: /sources/grep/grep/doc/grep.texi,v
retrieving revision 1.69
diff -u -r1.69 grep.texi
--- grep.texi 30 Jan 2009 01:46:03 -0000 1.69
+++ grep.texi 8 May 2009 12:19:50 -0000
@@ -1031,13 +1031,17 @@
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::