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

Re: regexp iteration limits

Thread Previous
Aristotle Pagaltzis
February 10, 2009 07:02
Re: regexp iteration limits
Message ID:
* Zefram <> [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.

Aristotle Pagaltzis // <>

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