[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] doc: correct grep.1's description of \w and \W (didn't mention "
From: |
Jim Meyering |
Subject: |
[PATCH] doc: correct grep.1's description of \w and \W (didn't mention "_") |
Date: |
Thu, 01 Mar 2012 16:57:24 +0100 |
FYI,
>From d062925026ab64b9863ebd44cd9b8b8f9c268d80 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 29 Feb 2012 11:04:18 +0100
Subject: [PATCH] doc: correct grep.1's descriptions of \w and \W (they
omitted "_")
* doc/grep.in.1: Fix descriptions of \w and \W.
They did not mention "_".
* doc/grep.texi (The Backslash Character and Special Expressions):
[\w, \W]: List the "_" before the char class, not after: [_[:alnum:]],
for readability and to be consistent with the man page.
---
doc/grep.in.1 | 4 ++--
doc/grep.texi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index 65d3e3a..4cf1f17 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -717,11 +717,11 @@ at the edge of a word.
The symbol
.B \ew
is a synonym for
-.B [[:alnum:]]
+.B [_[:alnum:]]
and
.B \eW
is a synonym for
-.BR [^[:alnum:]] .
+.BR [^_[:alnum:]] .
.SS Repetition
A regular expression may be followed by one of several repetition operators:
.PD 0
diff --git a/doc/grep.texi b/doc/grep.texi
index de73d7f..7648a0a 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -1377,10 +1377,10 @@ Match the empty string at the beginning of word.
Match the empty string at the end of word.
@item \w
-Match word constituent, it is a synonym for @samp{[[:alnum:]_]}.
+Match word constituent, it is a synonym for @samp{[_[:alnum:]]}.
@item \W
-Match non-word constituent, it is a synonym for @samp{[^[:alnum:]_]}.
+Match non-word constituent, it is a synonym for @samp{[^_[:alnum:]]}.
@item \s
Match whitespace, it is a synonym for @samp{[[:space:]]}.
--
1.7.9.2.324.g1221
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] doc: correct grep.1's description of \w and \W (didn't mention "_"),
Jim Meyering <=