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)
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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1165536
Title:
grep
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