Subject: Re: [PATCH 1/2] tests: fix unportable "\?" and "\+" regex syntax

From: Junio C Hamano <[email-masked]>
Date: Thu, 21 Feb 2019 21:00:32 -0800

Ævar Arnfjörð Bjarmason  <[email-masked]> writes:

> Fix widely supported but non-POSIX basic regex syntax introduced in
> [1] and [2]. On GNU, NetBSD and FreeBSD the following works:
>
>     $ echo xy >f
>     $ grep 'xy\?' f; echo $?
>     xy
>     0
>
> The same goes for "\+". The "?" and "+" syntax is not in the BRE
> syntax, just in ERE, but on some implementations it can be invoked by
> prefixing the meta-operator with "\", but not on OpenBSD:

Yup, thanks for testing, spotting and fixing.  I do recall finding
one of these during my review during recent couple of cycles, but
apparently eyeballing will not always catch everything X-<.