From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric Pement" Newsgroups: gmane.emacs.help Subject: Re: how to pass \b to grep on w32? Date: 14 Sep 2005 09:54:17 -0700 Organization: http://groups.google.com Message-ID: <1126716857.584187.204630@g47g2000cwa.googlegroups.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1126717019 21197 80.91.229.2 (14 Sep 2005 16:56:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Sep 2005 16:56:59 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 14 18:56:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EFaXc-0000nz-RU for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Sep 2005 18:55:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFaXc-0004ng-3h for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Sep 2005 12:55:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 66.185.249.65 Original-X-Trace: posting.google.com 1126716862 3119 127.0.0.1 (14 Sep 2005 16:54:22 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 14 Sep 2005 16:54:22 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=66.185.249.65; posting-account=63lmNgwAAABqjm0XxoXi1UjvjQ6CohmC Original-Xref: shelby.stanford.edu gnu.emacs.help:133901 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:29457 Archived-At: 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