[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Progressively slow pattern match
From: |
Alan Mackenzie |
Subject: |
Re: Progressively slow pattern match |
Date: |
Wed, 17 May 2006 20:00:18 +0000 (GMT) |
On Wed, 17 May 2006, Ralf Angeli wrote:
>* David Kastrup (2006-05-17) writes:
>> Ralf Angeli <address@hidden> 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.