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 `[email protected]` 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
publickey - [email protected] - 0x3FEA1A6D.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
