all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
To: help-gnu-emacs@gnu.org
Subject: Re: will we ever have zero width assertions in regexps?
Date: Tue, 8 Feb 2011 22:41:18 +0000 (UTC)	[thread overview]
Message-ID: <slrnil3hke.80t.nospam-abuse@powdermilk.math.berkeley.edu> (raw)
In-Reply-To: jwvd3n3twxv.fsf-monnier+gnu.emacs.help@gnu.org

On 2011-02-07, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> Hmm, I thought about a different scenario: if the bit is set, then one
>> switches to a DIFFERENT REx designed for a multi-line case.  Otherwise
>> why not just run it against the rest of the buffer, instead of
>> one-line?
>
> Because we don't want to match those regexps against the whole buffer
> every time the buffer is modified (the buffer may be large).

I think there is some confusion here: I did not want to mean that you
run "another REx" via re-search(), but via looking-at() at the
corresponding position...  Essentially: do you want the REx to start
match on the current line, or end match on the current line?

Or maybe you mean a different thing, and
WANT e.g. [^a-z] to actually "mean" [^a-z\n] ?  (So only an explicit
non-negated \n in a REx may match \n in a buffer?)

> BTW, another reason to want a non-backtracking matcher can be seen in
> the recent thread "Stack overflow in regexp matcher".

I think this is a red herring.  Try to stack-overflow the Perl
matcher...  (Possible, but one must be very malicious to hit these
situations.)

Ilya


  reply	other threads:[~2011-02-08 22:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1296054361.23496.help-gnu-emacs@gnu.org>
2011-01-26 15:58 ` will we ever have zero width assertions in regexps? Stefan Monnier
2011-01-27  1:45   ` Le Wang
     [not found]   ` <mailman.6.1296092730.6982.help-gnu-emacs@gnu.org>
2011-01-27  2:21     ` Stefan Monnier
2011-01-27  6:34       ` Ilya Zakharevich
2011-01-27 16:10         ` Stefan Monnier
2011-01-28 23:49           ` Ilya Zakharevich
2011-01-29  2:51             ` Stefan Monnier
2011-01-29 22:28               ` Ilya Zakharevich
2011-01-31 16:08                 ` Stefan Monnier
2011-01-31 17:10                   ` Ilya Zakharevich
2011-01-31 21:29                     ` Stefan Monnier
2011-02-02 15:09                       ` Ilya Zakharevich
2011-02-07 20:30                         ` Stefan Monnier
2011-02-08 22:41                           ` Ilya Zakharevich [this message]
2011-01-26 14:55 Le Wang

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

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

  git send-email \
    --in-reply-to=slrnil3hke.80t.nospam-abuse@powdermilk.math.berkeley.edu \
    --to=nospam-abuse@ilyaz.org \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.