in reply to Perl's regex engine causes me distress

This is sometimes called auto-possesification in regex literature. Ive been looking into implementing it, but its not straightforward to do. Unfortunately. PCRE does it to some extent, but not Perl.

---
$world=~s/war/peace/g

  • Comment on Re: Perl's regex engine causes me distress

Replies are listed 'Best First'.
Re^2: Perl's regex engine causes me distress
by sgt (Deacon) on Feb 07, 2007 at 10:44 UTC

    by the way the possessive notation +<quantifier> (saw it first in the second edition of the owl's book) is cute actually: "E++" reads well, take all you can (of these E) don't backtrack.

    cheers --stephan