Re: bug#60690: -P '\d' in GNU and git grep
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 4, 2023, 19:31 UTC
- Message-ID
- <xmqqttxvzbo8.fsf@gitster.g>
- In-Reply-To
- <96358c4e-7200-e5a5-869e-5da9d0de3503@cs.ucla.edu>
Paul Eggert <eggert@cs.ucla.edu> writes:
Show 9 quoted lines
> This is an evolving area. Git master is fiddling with flags and > options, and so is GNU grep master, and so is PCRE2, and there are > bugs. If you're running bleeding-edge versions of this code you'll get > different behavior than if you're running grep 3.8, pcregrep 8.45, > Perl 5.36, and git 2.39.2 (which is what Fedora 37 has). > > What I'm fearing is that we may evolve into mutually incompatible > interpretations of how Perl regular expressions deal with UTF-8 > text. That'd be a recipe for confusion down the road.
Nicely said. My personal inclination is to let Perl folks decide and follow them (even though I am skeptical about the wisdom of letting '\d' match anything other than [0-9]), but even in Git circle there would be different opinions, so I am glad that the discussion is visible on the list to those who are intrested.