On 2018-11-4 16:26 , Helmut K. C. Tessarek wrote:
> This works perfectly on the commandline without additional escaping:
> 
> cat configure.ac |sed -E "s/AC_INIT\(\[tmux\],
> (next-[0-9]+\.[0-9]+)\)/AC_INIT([tmux], \1 (${version}))/g"
> 
> (with export version=bla)

Yes, because the brackets here don't have to be protected from the
shell. Imagine if the string you wanted to replace contained backticks
or dollar signs instead of brackets.

> But I get your point. There are cases where additional escaping is
> required. Still, IMO this additional escaping makes sense, while in the
> reinplace case it does not. I was trying for hours to correctly escape
> in reinplace.

What about it doesn't make sense to you? We need to understand this in
order to write documentation that explains it well.

- Josh

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to