develooper Front page | perl.perl5.porters | Postings from February 2009

Re: regexp iteration limits

Thread Previous
From:
Aristotle Pagaltzis
Date:
February 10, 2009 07:02
Subject:
Re: regexp iteration limits
Message ID:
20090210150159.GC1793@klangraum.plasmasturm.org
* Zefram <zefram@fysh.org> [2009-02-10 15:55]:
> Aristotle Pagaltzis wrote:
> >(?>(?:x.|.x)+)
>
> In this case, to tell Perl that no backtracking is required,
> if that is the case, then the inner (?:) also needs to become
> (?>). Is that the point you were trying to make?

Yes. I *think* it is possible to eliminate backtracking if the
only thing inside a posessive grouping is another quantified
posessive grouping and nothing else. I can’t come up with a
counterexample, at least. Someone else might, though.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About