On Fri, 7 Dec 2001 10:58:03 +1100 , [EMAIL PROTECTED] (Andrew Savige) wrote:
> *** Hole 4 (mid.pl) *** > --- Piers Cawley --------------------- 25 > #!/usr/bin/perl -p0 > $_=$1while/.(^.+)^/ms > --- Rick Delaney --------------------- 25 > #!/usr/bin/perl -p0 > $_=$1while/.^(.+)^/sm > --- Karsten Sperling ----------------- 25 > #!/usr/bin/perl -p0 > $_=$1while/.(^.+^)/sm > --- Eugene van der Pijll ------------- 25 > #!/usr/bin/perl -p0 > $_=$1while/.^(.+)^/ms > --- Keith C Ivey --------------------- 25 > #! /usr/bin/perl -p0 > $_=$1while/.(^.+)^/ms Interesting how different people liked that ^'s in different places :) (Though it doesn't really matter since it's zero-length, so putting it inside or outside the capturing parens doesn't affect what gets matched. Might make a small speed difference due to the the effect of leaving the capturing parens and possibly re-entering them on backtracking, I suppose.) Cheers, Philip
