From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: re-search repeat by \{N\} not working. Bug? Date: 22 Aug 2005 15:39:10 -0700 Organization: http://groups.google.com Message-ID: <1124750350.251867.22430@g43g2000cwa.googlegroups.com> References: <4308A500.2080907@schmieder-laher.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1124750940 7531 80.91.229.2 (22 Aug 2005 22:49:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Aug 2005 22:49:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 23 00:49:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E7L4e-0005R5-4S for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Aug 2005 00:47:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7L8O-00018f-EY for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Aug 2005 18:51:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 198.74.20.73 Original-X-Trace: posting.google.com 1124750355 16243 127.0.0.1 (22 Aug 2005 22:39:15 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 22 Aug 2005 22:39:15 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=198.74.20.73; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:133391 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:28921 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28921 > "\ [A-Z]\{3\}\ " > > should find a 3letter Word surrounded by blanks > I'm not sure of your indended purpose in the "\ " sequence but I'd guess that could be your problem. All these work fine for me. Each matches 3 letter words with slight differences in what constitutes a word. For example the first won't match a word if it begins in the first column or ends in the last column of a line or is delimited by punctuation such as a period or comma or is preceeded or followed by a tab rather than a space. The 2nd allows for tab characters and possibly eol but not punctuation. The 3rd and 4th are very similar. They allow punction, tab, space and eol characters and differ only in whether the delimiting character is considered part of the match or just required but not actually part of it. Interactively typed String used programmatically [A-Za-z]\{3\} " [A-Za-z]\\{3\\} " \s-[A-Za-z]\{3\}\s- "\\s-[A-Za-z]\\{3\\}\\s-" \Sw[A-Za-z]\{3\}\Sw "\\Sw[A-Za-z]\\{3\\}\\Sw" \b[A-Za-z]\{3\}\b "\\b[A-Za-z]\\{3\\}\\b"