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

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> 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-<.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux