emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progressively slow pattern match


From: Ralf Angeli
Subject: Re: Progressively slow pattern match
Date: Wed, 17 May 2006 23:13:28 +0200

* Alan Mackenzie (2006-05-17) writes:

> On Wed, 17 May 2006, Ralf Angeli wrote:
>
>>The original regexp looks something like
>>"\\(%+[ \t]*\\)*foo"
>>in order to match stuff like
>>%% %% %% foo
>
> Use "\\(%+[ \t]+\\)%*foo"

Thanks for all the explanations and suggestions, also from Kevin,
David and Stuart.  So it really was a badly written regexp. \c:

I think I'll settle with
"\\(%[% \t]*\\)?foo"
That means David's suggestion with an added "?" in order for it to
match a bare "foo" without preceding comment characters as well.  For
me it looks like the one easiest to understand.

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]