[Touch-packages] [Bug 1165536] Re: grep doesn't handle \w correctly

2025-03-04 Thread Skia
I think the usage of `grep` is a bit mistaken. `\w` is a literal replacement for `[_[:alnum:]]`, and `\W` is for inverting that, so if you enclose it again in some brackets, it doesn't work anymore. You probably want something more like this: ❯ grep -Re '\Wlog\W' /tmp/test2 if ($this->_touchOnly)

[Touch-packages] [Bug 1165536] Re: grep doesn't handle \w correctly

2025-02-28 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: grep (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to grep in Ubuntu. https://bugs.launchpad.net/bug

[Touch-packages] [Bug 1165536] Re: grep doesn't handle \w correctly

2025-02-28 Thread Rolf Leggewie
Thank you for that interesting test case. I think there is something else at play here, maybe some shell quirk. Consider the following simplified test case. $ cat /tmp/LP1165536.txt 123 ABC abc !%$ $ grep [\w] /tmp/LP1165536.txt || echo "nothing found" # should match all three characters in l