git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luciano Rocha <luciano@eurotux.com>
To: Thomas Volpini <tvolpini@gmx.net>
Cc: git@vger.kernel.org
Subject: Re: git grep and word boundaries
Date: Tue, 27 May 2008 09:56:12 +0100	[thread overview]
Message-ID: <20080527085612.GA31765@bit.office.eurotux.com> (raw)
In-Reply-To: <483BC7E2.6090804@gmx.net>

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Tue, May 27, 2008 at 10:35:46AM +0200, Thomas Volpini wrote:
>  Hello,
> 
>  it seems that git grep doesn't do word boundaries as described:
> 
>  $ cat bar
>  foo bar baz
>  $ grep "\<bar\>" *
>  foo bar baz
>  $ git grep "\<bar\>" *
>  $ git grep -w "\<bar\>" *
>  $ git grep -w "bar" *
>  bar:foo bar baz
>  $ git grep -E "\<bar\>" *
>  $ git grep -E "\bbar\b" *
>  $

It works here. Did you add the file?
$ grep "\<bar\>" *
foo bar baz
$ git grep "\<bar\>"
bar:foo bar baz
$ git grep "\<bar\>" *
bar:foo bar baz
$ git grep \\bbar\\b
bar:foo bar baz
$ git grep \\bbar\\b *
bar:foo bar baz

-- 
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

      reply	other threads:[~2008-05-27  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27  8:35 git grep and word boundaries Thomas Volpini
2008-05-27  8:56 ` Luciano Rocha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080527085612.GA31765@bit.office.eurotux.com \
    --to=luciano@eurotux.com \
    --cc=git@vger.kernel.org \
    --cc=tvolpini@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).