Slight imprecision in documentation
Massimo Masotti <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm referring to version 4.2.2. I noticed a slight imprecision in the
documentation at
"http://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html".
Using sed to get a list of compressed files from the attached
"from.htm", I cannot get the substitutions with:
sed
's/.*\(http:\/\/xorg.freedesktop.org\/releases\/individual\/lib\/[^"]*\.tar\.(gz\|bz2)\).*/\1/g'
from.htm >to.htm
Instead, I must use this:
sed
's/.*\(http:\/\/xorg.freedesktop.org\/releases\/individual\/lib\/[^"]*\.tar\.\(gz\|bz2\)\).*/\1/g'
from.htm >to.htm
So, I think the documentation should be updated from:
regexp1|\||regexp2
Matches either regexp1 or regexp2. Use parentheses to use complex
alternative regular expressions. The matching process tries each
alternative in turn, from left to right, and the first one that
succeeds is used. It is a GNU extension.
to:
regexp1|\||regexp2
Matches either regexp1 or regexp2. Use escaped parentheses to use
complex alternative regular expressions. The matching process tries
each alternative in turn, from left to right, and the first one that
succeeds is used. It is a GNU extension.
I apologize if I'm wrong.
My Best Regards.
Massimo Masotti - Italy
from.htm
(text/plain, 137.9 KB) - not displayed