On Wed, Jan 5, 2022 at 1:53 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > On Wed, Jan 05, 2022 at 02:46:10PM -0600, Eric W. Biederman wrote: > > > > Being in assembly it did not have anything after the name do_exit so it > > hid from my regex "[^A-Za-z0-9_]do_exit[^A-Za-z0-9]". Thank you for > > finding that. > > Umm... What's wrong with '\<do_exit\>'? Christ people, you both make it so complicated. If you want to search for 'do_exit', just do git grep -w do_exit where that '-w' does exactly that "word boundary" thing. I thought everybody knew about this, because it's such a common thing to do - checking my shell history, more than a third of my "git grep" uses use '-w', exactly because it's very convenient for identifier lookup But yes, in more complex cases where you have other parts to the pattern (ie you're not looking *just* for a single word), by all means use '\<' and/or '\>'. Linus