On 2/6/07, H.Merijn Brand <h.m.brand@xs4all.nl> wrote: > On Tue, 6 Feb 2007 21:15:11 +0100, demerphq <demerphq@gmail.com> wrote: > > > On 2/6/07, demerphq <demerphq@gmail.com> wrote: > > > This prototype patch adds support for > > > > > > (?^......) > > > > > > which has the property that the buffers in any given branch that the > > > construct contains will start at the same number. Any buffers after > > > the construct will be numbered consequetively just as the would if the > > > only branch in the construct was the one with the most buffers in it. > > > > > > Since i seem to be unable to explain this in simple words maybe a > > > picture will do (view it in a fixed width font.) > > > > > > $1 $1 $2 $1 $2 $3 > > > (?^...(...)...|....(....(....)...)|...(..)(..)..)..(...) > > > > > > > > > Merijn, do you want to try this out and get back to me please? > > > > Attached patch doesnt f*ck eveything up at the same time. > > Right :) > > I presented this tonight in Amsterdam.pm, and got replies varying > from "useful" to "why the f... did it take two years to implement?" > (Yes, I talked about my thought about this with John Krieken two > years ago, and he remembered) > > I personally would still prefer the (?|...) over (?^...), as it > sounds more logical. > > All agreed that the choice to make this new construct non-capturing > was good. > > For the record, I asked for a regex modifier/flag (I suggested /r), > but Yves convinced me that would lead to trouble. Of course the > mongers also asked for a flag, and I now could explain why. IRC++. > > Which brings up a remark from Abigail that the new /k will break > Regexp::Common, as the k flag is in the public API. > > > Also some tests included. > > All tests passed. > > > Tux: wanna do the perlre.pod patch? > > Which one? Heh. Ok, well attached patch adds a bit of comments, updates perlre.pod the new syntax called the "branch reset" pattern, and adds a few more tests. Cheers, Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next