unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ralf Angeli <angeli@caeruleus.net>
Cc: emacs-devel@gnu.org
Subject: Re: Progressively slow pattern match
Date: Wed, 17 May 2006 23:13:28 +0200	[thread overview]
Message-ID: <87mzdg9wxz.fsf@neutrino.caeruleus.net> (raw)
In-Reply-To: Pine.LNX.3.96.1060517195744.386B-100000@acm.acm

* 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	other threads:[~2006-05-17 21:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 19:33 Progressively slow pattern match Ralf Angeli
2006-05-17 19:37 ` David Kastrup
2006-05-17 19:50   ` Kevin Rodgers
2006-05-17 19:50   ` Ralf Angeli
2006-05-17 20:00     ` Alan Mackenzie
2006-05-17 21:13       ` Ralf Angeli [this message]
2006-05-17 20:04     ` David Kastrup
2006-05-17 20:21     ` Stuart D. Herring
2006-05-17 19:53 ` Alan Mackenzie
2006-05-17 23:13 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mzdg9wxz.fsf@neutrino.caeruleus.net \
    --to=angeli@caeruleus.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).