GNU bug report logs - #62605
`[\d]` does not work with PCRE

Previous Next

Package: grep;

Reported by: Tukusej’s Sirs <tukusejssirs <at> protonmail.com>

Date: Sun, 2 Apr 2023 04:48:02 UTC

Severity: normal

Tags: patch

Merged with 60690, 62552

To reply to this bug, email your comments to 62605 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#62605; Package grep. (Sun, 02 Apr 2023 04:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tukusej’s Sirs <tukusejssirs <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sun, 02 Apr 2023 04:48:02 GMT) Full text and rfc822 format available.

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

From: Tukusej’s Sirs <tukusejssirs <at> protonmail.com>
To: "bug-grep <at> gnu.org" <bug-grep <at> gnu.org>
Subject: `[\d]` does not work with PCRE
Date: Sat, 01 Apr 2023 21:32:24 +0000
[Message part 1 (text/plain, inline)]
Hi, everyone,

I have just noticed that `grep -P '[\d]' <<< 'asdf 1234 asdf'` does not work, while `grep -P '[0-9]' <<< 'asdf 1234 asdf'` works as expected. When `\d` is used outside of square brackets, it works as expected.
I have no idea why `[\d]` does not work, but after I open this SO question, it seems to be a problem at least in `grep <at> 3.10` or `3.7+` (excluding `3.7`).
Note that I use Arch Linux and I have installed `grep` from the official repositories.
`grep` version I currently use:

    grep (GNU grep) 3.10
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    

    Written by Mike Haertel and others; see
    <https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>.


How this helps someone to find the bug in the code. :)

Tukusej’s Sirs
[Message part 2 (text/html, inline)]
[publickey - tukusejssirs@protonmail.com - 0x3FEA1A6D.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Merged 62552 62605. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 02 Apr 2023 18:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-grep <at> gnu.org:
bug#62605; Package grep. (Sun, 02 Apr 2023 18:39:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Tukusej’s Sirs <tukusejssirs <at> protonmail.com>
Cc: 62605 <at> debbugs.gnu.org
Subject: Re: bug#62605: `[\d]` does not work with PCRE
Date: Sun, 2 Apr 2023 11:38:07 -0700
Thanks for reporting the bug with [\d]. This is a known bug and we're 
working on it; please see:

https://bugs.gnu.org/62552

I merged the two bug reports.




Information forwarded to bug-grep <at> gnu.org:
bug#62605; Package grep. (Sun, 02 Apr 2023 19:14:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Tukusej’s Sirs <tukusejssirs <at> protonmail.com>
Cc: 62605 <at> debbugs.gnu.org
Subject: Re: bug#62605: `[\d]` does not work with PCRE
Date: Sun, 2 Apr 2023 12:13:31 -0700
Also, please see the recent thread about this in the grep-devel mailing 
list, e.g.:

https://lists.gnu.org/r/grep-devel/2023-04/msg00004.html




Merged 60690 62552 62605. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Mon, 03 Apr 2023 20:45:02 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 30 days ago.

Previous Next


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