--- Ton Hospel <[EMAIL PROTECTED]> wrote:
> -p0 s/\G(.*)(.*
> )(?=\1.\2|$)//g
> 
> This should be about as efficient as a simple regex
> approach gets. It's also the shortest yet :-)
> It outputs starting from the first line that can't
> be extended. No output means all lines work.

Excellent! That's more useful output too!
31 chars for the alien!

There seemed to be a bug in previous versions (though to be honest not a
serious one, one that could be considered as inviting a loosening of the
specification) - if you added an extra blank line between two real lines, it
would still pass. Funnily enough, my log file did have such a blank line.
It also crashed on my 2500-line file. Your current one doesn't crash.

Many thanks, all!
Phil

()  ASCII ribbon campaign      ()    Hopeless ribbon campaign
/\    against HTML mail        /\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]


 
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

Reply via email to