emacs-devel
[Top][All Lists]
Advanced

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

Re: Fixing ill-conditioned regular expressions. Proof of concept.


From: Alan Mackenzie
Subject: Re: Fixing ill-conditioned regular expressions. Proof of concept.
Date: Thu, 26 Feb 2015 16:21:19 +0000
User-agent: Mutt/1.5.22 (2013-10-16)

Hello, Stefan.

On Thu, Feb 26, 2015 at 08:46:22AM -0500, Stefan Monnier wrote:
> > I think that's true.  There might be a slight problem with groups which
> > match only the empty string.  Something like:
> >     R*\(\)R*
> > , but anybody who writes such regexps deserves what she gets.

> What is it that I deserve to get?

You deserve, perhaps, to lose (match-beginning 1) and (match-end 1),
which were ill-defined anyway.  You perhaps deserve to lose the entire
empty group.  Writing a regexp like that, you deserve pain.  ;-)

Have you really written a regexp like this (apart from for testing
purposes)?.  If so, what's it for?

By the way, how do you see the prospects of this file becoming
incorporated into Emacs at some stage?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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