GNU bug report logs - #60690
[PATCH v2] grep: correctly identify utf-8 characters with \{b,w} in -P

Previous Next

Package: grep;

Reported by: Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>

Date: Mon, 9 Jan 2023 12:19:01 UTC

Severity: normal

Tags: patch

Merged with 62552, 62605

Full log


Message #37 received at 60690 <at> debbugs.gnu.org (full text, mbox):

From: Junio C Hamano <gitster <at> pobox.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: demerphq <at> gmail.com, 60690 <at> debbugs.gnu.org,
 mega lith01 <megalith01 <at> gmail.com>, Carlo Arenas <carenas <at> gmail.com>,
 Ævar Arnfjörð Bjarmason <avarab <at> gmail.com>,
 pcre-dev <at> exim.org,
 Tukusej’s Sirs <tukusejssirs <at> protonmail.com>,
 git <at> vger.kernel.org
Subject: Re: bug#60690: -P '\d' in GNU and git grep
Date: Tue, 04 Apr 2023 12:31:51 -0700
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> 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.





This bug report was last modified 2 years and 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.