develooper Front page | perl.golf | Postings from August 2002

Re: Son of (-ugene's Cantor

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
August 21, 2002 09:07
Subject:
Re: Son of (-ugene's Cantor
Message ID:
20020821160639.GD316152@linguist.thayer.dartmouth.edu
On Wed, Aug 21, 2002 at 08:47:32AM +0100, Piers Cawley wrote:
> Andrew.Savige@ir.com writes:
> 
> > En op 18 augustus 2002 sprak Yorkshireman Piers Cawley:
> > > Tee hee.
> > >
> > >  -l $_=$"x2**pop;s'$'/\\',print,s/\\../$&^PC1^PLM/egwhile+s\^ \\
> > >
> > > I *thought* that lookbehind looked a little too long...
> > 
> > Ton always has the last laugh. Your solution does not work.
> 
> How very annoying. I wonder it doesn't work? Probably something to do
> with how the regex engine matches after a replacement...

I would guess it's because /(?<=\\)../ can match the same backslash that
was matched at the end of the previous match, but /\\../ has to match a
completely new backslash.

Ronald

Thread Previous | Thread Next


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