Kevin Ushey <kevinushey@xxxxxxxxx> writes: > I'm seeing the following, which I believe is unexpected. I have a file > with contents: > > $ cat hello.txt > WholeWord > Whole Word > Whole > > I can use `git grep` to search with word boundaries; e.g. > > $ git grep --untracked '\bWhole\b' > hello.txt:Whole Word > hello.txt:Whole > > However, if I add `-E` to use extended regular expressions, the same > invocation finds no search results. > > $ git grep --untracked -E '\bWhole\b' Does not seem to reproduce for me. In a randomly picked repository (the source to git itself), I did $ cat >hello.txt WholeWord Whole Word Whole ^D and "git grep --untracked -E '\bWhole\b' hello.txt" with or without the "-E" option shows the same two lines as hits. Without the pathspec hello.txt, the output includes one line from unpack-trees.c as well, but the hits from the untracked hello.txt are the same. The tip of 'master', v2.40.0, v2.38.4, v2.37.4, v2.35.4 (they are by no means significant milestones---just some random versions I picked to test) all behave the same way.