From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Progressively slow pattern match Date: Wed, 17 May 2006 20:00:18 +0000 (GMT) Message-ID: References: <87r72sa0s0.fsf@neutrino.caeruleus.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1147896521 5763 80.91.229.2 (17 May 2006 20:08:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 May 2006 20:08:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 17 22:08:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FgSJv-0004Rf-GW for ged-emacs-devel@m.gmane.org; Wed, 17 May 2006 22:08:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgSJv-0004yb-1E for ged-emacs-devel@m.gmane.org; Wed, 17 May 2006 16:08:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgSJF-0004lN-Hq for emacs-devel@gnu.org; Wed, 17 May 2006 16:07:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgSJE-0004l5-Va for emacs-devel@gnu.org; Wed, 17 May 2006 16:07:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgSJE-0004l0-Mw for emacs-devel@gnu.org; Wed, 17 May 2006 16:07:52 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgSM7-0008BM-64; Wed, 17 May 2006 16:10:51 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id UAA00450; Wed, 17 May 2006 20:00:18 GMT X-Sender: root@acm.acm Original-To: Ralf Angeli In-Reply-To: <87r72sa0s0.fsf@neutrino.caeruleus.net> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54650 Archived-At: On Wed, 17 May 2006, Ralf Angeli wrote: >* David Kastrup (2006-05-17) writes: >> Ralf Angeli writes: >>> (looking-at "\\(%+\\)*foo") >[...] >>> Is this a deficiency in Emacs? Is there a way matching can be sped up >>> with this or maybe another, equivalent regexp? >> Uh, "\\(%+\\)?foo" maybe? >The original regexp looks something like >"\\(%+[ \t]*\\)*foo" >in order to match stuff like >%% %% %% foo Use "\\(%+[ \t]+\\)%*foo" ^ instead >Ralf -- Alan.