bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed documentation bug report


From: Jose E. Marchesi
Subject: Re: sed documentation bug report
Date: Fri, 12 Jul 2013 10:52:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Nils.

    There's a minor omission in the sed documentation, at least as of
    4.2.1 (don't have 4.2.2 to check): it forgets to mention that | also
    needs to be escaped in basic regular expressions, but not in
    extended regular expressions.

The behavior of the | character in extended regular expressions is
documented in the latest version of the manual (git) as follows:

The only difference between basic and extended regular expressions is
in the behavior of a few characters: @samp{?}, @samp{+}, parentheses,
braces (@address@hidden@}}), and @samp{|}.  While basic regular expressions
require these to be escaped if you want them to behave as special
characters, when using extended regular expressions you must escape
them if you want them @emph{to match a literal character}.  @samp{|} is
special here because @samp{\|} is a GNU extension -- standard basic
regular expressions do not provide its functionality.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]