help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to pass \b to grep on w32?


From: Eric Pement
Subject: Re: how to pass \b to grep on w32?
Date: 14 Sep 2005 09:54:17 -0700
User-agent: G2/0.2

John Steele Scott wrote:

> I am trying to pass the following to M-x grep:
>
> grep -nHr --include=*.c . -e \bWORD\b
>
> On my GNU/Linux system, this works (if I put quotes around the regexp
> and include string), but on Windows XP, it doesn't work (no matches are
> found, when I know there should be some). If I just have WORD as the
> regexp, it works fine, but it's matching DWORD, and I only want to find
> WORD (I'm trying to make a 16-bit program 32-bit clean, blech).
>
> It seems to me that something is fouling up the \b part of the regexp.
> Can someone tell me how to get the \b through to grep?

You probably need to add double quotes to the search string, and a path
name to begin the search, which should be in forward slashes, not
backslashes. If I omit the path name, my installation of Emacs searches
the same folder where runemacs.exe is stored. Try this:

   grep -nHr --include=*.c . -e "\bWORD\b" c:/path/to/start/

That's how it works on my system (WinXP)

--
Eric Pement



reply via email to

[Prev in Thread] Current Thread [Next in Thread]