in reply to Re: Golf - now for the Sentencing.
in thread Golf - now for the Sentencing.
I believe grep wants everything to be lowercased other than beginning of sentences and single I's. Adding an lc and using your regex, this code$_='tHere are CAPITAL leTters iNterSpersed';
should output this# Test: $_='tHere is more than one way to do it. Also, i am just ANOTHER golfer.'; # 1 2 3 #234567890123456789012345678901 $_=lc;s;^.|\bi\b|\.\s*.;\U$&;g; # Proof print
There is more than one way to do it. Also, I am just another golfer.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Golf - now for the Sentencing.
by Sidhekin (Priest) on Apr 23, 2002 at 08:47 UTC |