From: Jeff King Date: Thu, 19 Mar 2020 15:53:07 GMT Subject: Re: [PATCH 1/6] t4061: use POSIX compliance regex(7) Message-ID: <20200319155307.GB3513282@coredump.intra.peff.net> In-Reply-To: On Thu, Mar 19, 2020 at 09:00:02PM +0700, Đoàn Trần Công Danh wrote: > BRE interprets `+` literally, and > `\+` is undefined for POSIX BRE, from: > https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02 > > > The interpretation of an ordinary character preceded > > by an unescaped ( '\\' ) is undefined, except for: > > - The characters ')', '(', '{', and '}' > > - The digits 1 to 9 inclusive > > - A character inside a bracket expression > > This test is failing with busybox sed, the default sed of Alpine Linux > > Fix it by using literal `+` instead. This makes sense, I think. It could hurt a sed which is expected ERE and needs the "+" escaped, but I think such a sed would be wrong (and I imagine would break things elsewhere). -Peff