Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) $ mkdir git-grep-test $ cd git-grep-test $ git init $ echo "sub test { return; }" > test.pl $ git grep --untracked -E \\btest\\b What did you expect to happen? (Expected behavior) It should find the results like the following: test.pl:sub test { return; } What happened instead? (Actual behavior) No results found What's different between what you expected and what actually happened? To get results, you have to use BSD style character classes: $ git grep --untracked -E \[\[:\<:\]\]test\[\[:\>:\]\] test.pl:sub test { return; } Anything else you want to add: Testing in both git 2.24 and 2.34 (the only other version I have access to at the moment), \\b and other GNU style character classes return results. My best guess is that https://github.com/git/git/commit/1819ad327b7a1f19540a819813b70a0e8a7f798f is causing git grep -E to require BSD style regular expression character classes. I don't know if this is a bug or an unadvertised change in behavior. In either case, it is frustrating. Any person or tool would have to know which version of git they have and which operating system they are on to get results. Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.40.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64 x86_64 compiler info: clang: 12.0.0 (clang-1200.0.32.29) libc info: no libc information available $SHELL (typically, interactive shell): /bin/bash [Enabled Hooks]