On Tue, Jan 16, 2007 at 04:59:51PM -0800, Phil Carmody wrote:
> --- Juho Snellman <[EMAIL PROTECTED]> wrote:
> > Phil Carmody <[EMAIL PROTECTED]> writes:
> > > -p0 s/^((.*)(.*)
> > > (?=\2.\3
> > > |$))*$//
> > 
> > Assuming the last line is also newline-terminated:
> 
> Fair assumption
> 
> > -n0 a//^((.*)(.*
> > )(?=\2.\3|$))*$/
> 
> Kiitos, Juho.
> 
> That's gone beyond my perl ken! Was this the expected failure outcome?
> 
> $ echo -e "1\n12\n173\n" | perl -n0 -e 'a//^((.*)(.*
> )(?=\2.\3|$))*$/'
> Illegal division by zero at -e line 1, <> chunk 1.

I believe that should be -p0 s/...//, rather than -n0 a//.../.  It's the
same as yours, except with the newline matched as part of \3 to save a
character.

Ronald

Reply via email to