develooper Front page | perl.perl5.porters | Postings from September 1999

Re: Regular Expression Bug

Ilya Zakharevich
September 7, 1999 23:49
Re: Regular Expression Bug
Message ID:
On Tue, Sep 07, 1999 at 09:18:41PM -0700, horos wrote:
> > And probably you want m{\G(?p{ $brackets })}, which would avoid
> > recompile of the REx.
> How about  m"\G$brackets"o? Is this equivalent? (hope so)

If $brackets does not change: yes.

> > > Come to think of it, perhaps 'all or nothing' is a better term for the operator
> > > - ie, if something fails to match, the engine rewinds all the way back
> > > to the beginning, bumps up its position by 1 from the beginning point
> > > and then starts again.
> > 
> > Why this cannot be implemented by nested (?>) ?
> I would hope that it would be. I'd also assume that this would be a good way
> to describe the regex inside of perlre.

Again, I have no idea what you are talking about.

> > Why do you think it is not doing it like this?
> Well, like I said, I'd hope so. All I'm doing is making sure that we are talking
> about the same thing. Describing it this way in perlre would be a good idea,
> IMO.

Do not think so.  Who says that Perl REx engine *should be* NFA?  This
is just a detail of the implementation.

> Mentioning 'use re 'debugcolor';' would be a good idea as well. 'Tis extremely
> useful... Planning an interface with it and emacs? ;-)

How can emacs help with such a thing?

Ilya Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About