bug#51235: resolve old FIXME in PCRE implementation to allow more than 1 expression

2021-10-16 Thread Paul Eggert
On 10/16/21 1:58 AM, Carlo Arenas wrote: without the patch, the error isn't correct either: $ grep -P '[ a]' grep: the -P option only supports a single pattern I don't offhand see what's wrong with the diagnostic, as the PATTERNS operand is documented to be one that "contains one or more pa

bug#51235: resolve old FIXME in PCRE implementation to allow more than 1 expression

2021-10-16 Thread Carlo Arenas
On Sat, Oct 16, 2021 at 12:50 AM Paul Eggert wrote: > > On 10/16/21 12:00 AM, Carlo Arenas wrote: > > With this patch, multiple expressions (from -e or -f) are now > > acceptable with -P for easier side by side comparison with the other > > supported engines. > > Surely this mishandles shell comma

bug#51235: resolve old FIXME in PCRE implementation to allow more than 1 expression

2021-10-16 Thread Paul Eggert
On 10/16/21 12:00 AM, Carlo Arenas wrote: With this patch, multiple expressions (from -e or -f) are now acceptable with -P for easier side by side comparison with the other supported engines. Surely this mishandles shell commands like this one: grep -P '[ a]' which should be an error, but wit

bug#51235: resolve old FIXME in PCRE implementation to allow more than 1 expression

2021-10-16 Thread Carlo Arenas
With this patch, multiple expressions (from -e or -f) are now acceptable with -P for easier side by side comparison with the other supported engines. Alternatively, multiple expressions could be compiled and run sequentially for matching, but I suspect the added compilation time is likely higher,