From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Friedrich Laher Newsgroups: gmane.emacs.help Subject: Re: re-search repeat by \{N\} not working. Bug? Date: Tue, 23 Aug 2005 07:36:48 +0200 Message-ID: <430AB5F0.9000700@schmieder-laher.de> References: <4308A500.2080907@schmieder-laher.de> <1124750350.251867.22430@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1065658819==" X-Trace: sea.gmane.org 1124777470 25323 80.91.229.2 (23 Aug 2005 06:11:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Aug 2005 06:11:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 23 08:11:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E7RyR-00022m-Lo for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Aug 2005 08:09:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7S2C-0004EJ-4a for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Aug 2005 02:13:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E7Rlx-0000xu-2G for help-gnu-emacs@gnu.org; Tue, 23 Aug 2005 01:56:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E7Rlt-0000vu-TC for help-gnu-emacs@gnu.org; Tue, 23 Aug 2005 01:56:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7Rlr-0000hF-Do for help-gnu-emacs@gnu.org; Tue, 23 Aug 2005 01:56:27 -0400 Original-Received: from [212.227.126.186] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E7RYB-0006gr-2M for help-gnu-emacs@gnu.org; Tue, 23 Aug 2005 01:42:19 -0400 Original-Received: from p54A19292.dip0.t-ipconnect.de [84.161.146.146] (helo=schmieder-laher.de) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwpI-1E7RXP2Bb4-0001Ma; Tue, 23 Aug 2005 07:41:31 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en Original-To: help-gnu-emacs@gnu.org In-Reply-To: <1124750350.251867.22430@g43g2000cwa.googlegroups.com> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d0a55953dfb65f372f82ef4b3cf5b37b 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:28925 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28925 This is a multi-part message in MIME format. --===============1065658819== Content-Type: multipart/alternative; boundary="------------070808090805020102050406" This is a multi-part message in MIME format. --------------070808090805020102050406 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Thank you. It's in an 400 line program and I just forgot that the" \" needs to coded as "\\" ( interesting is that that iteratorconstruct is missing in the hardcopy of "The GNU Emacs Lisap Reference Manual" for Version 20 and 33.2.1 Syntax of Regular Expressions even says "no new special characters will be defined in the future" rgb wrote: >>"\ [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" > >_______________________________________________ >Help-gnu-emacs mailing list >Help-gnu-emacs@gnu.org >http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > > > --------------070808090805020102050406 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Thank you.

It's in an 400 line program and I just forgot that the" \" needs to coded as "\\"
(
 interesting is that that iteratorconstruct is missing in the hardcopy of

"The GNU Emacs Lisap Reference Manual" for Version 20
and
33.2.1 Syntax of Regular Expressions even says

 "no new special characters will be defined in the future"



rgb wrote:
"\ [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\} <ret>         " [A-Za-z]\\{3\\} "
\s-[A-Za-z]\{3\}\s-<ret>     "\\s-[A-Za-z]\\{3\\}\\s-"
\Sw[A-Za-z]\{3\}\Sw<ret>     "\\Sw[A-Za-z]\\{3\\}\\Sw"
\b[A-Za-z]\{3\}\b<ret>       "\\b[A-Za-z]\\{3\\}\\b"

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

  
--------------070808090805020102050406-- --===============1065658819== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1065658819==--