[Top][All Lists]

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

bug#62605: `[\d]` does not work with PCRE

From: Tukusej’s Sirs
Subject: bug#62605: `[\d]` does not work with PCRE
Date: Sat, 01 Apr 2023 21:32:24 +0000

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@3.10` or `3.7+` (excluding `3.7`).
Note that I use Arch Linux and I have installed `grep` from the official 
`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 
    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

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

Tukusej’s Sirs

Attachment: publickey - tukusejssirs@protonmail.com - 0x3FEA1A6D.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]