Paul Eggert <egg...@cs.ucla.edu> writes:

> In the normal case when @option{-E} is not used,
> +portable @command{sed} regular expressions should use @samp{\} only to escape
> +characters in the string @samp{$*.123456789[\^n}.  For example,
> +POSIX.1-2024 says it is implementation-defined
> +whether @samp{\|} means alternation or simply matches @samp{|},
> +so it should be avoided in portable scripts.  

Shouldn't '&' also be added to that list of characters? Since you will
have to backslash it if you want that character in the 's' command.
Otherwise it will be replaced with the text matched by the BRE.

Collin

Reply via email to