From: Ross Bamford Date: 2006-04-22T20:07:45+09:00 Subject: Re: Text Munger (#76) On Sat, 2006-04-22 at 19:28 +0900, Ross Bamford wrote: > On Sat, 2006-04-22 at 06:09 +0900, James Edward Gray II wrote: > > On Apr 21, 2006, at 3:34 PM, Bill Kelly wrote: > > > > > From: "Andrew Johnson" > > >> > > >> As a script, my one-liner is down to 70 chars including > > >> the newline. It can be shortened a bit as a command-liner. > > >> :-) > > > > > > Wow, nice. Does that include the restriction in the quiz rules that > > > numbers have to be left alone? Or does your solution rearrange > > > both numbers and letters? > > > > I'm still waiting for someone to show off their solution properly > > handling the trivial (multi-byte) example I showed earlier... :) > > $ ./munger.rb test.txt > Attehcaed is my r辿smu辿. (Sorry for the noise) - the test text used there doesn't go too well with my solution, which limits how much of a word is rearranged. This is a better example: [rosco@jukebox text-munger-76]$ ./munger.rb test2.txt La viiosn euro辿nepne str辿giatque [rosco@jukebox text-munger-76]$ ./munger.rb test2.txt La vioisn eurpe辿none strga辿itque [rosco@jukebox text-munger-76]$ ./munger.rb test2.txt La vioisn eurenop辿ne strtagi辿que [rosco@jukebox text-munger-76]$ ./munger.rb test2.txt La vision eurpe辿onne str辿igatque [rosco@jukebox text-munger-76]$ ./munger.rb test2.txt La vision eur辿onpene strgt辿iaque [rosco@jukebox text-munger-76]$ ./munger.rb test2.txt La visoin eure辿onpne striagt辿que (from La vision europ辿enne strat辿gique) -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk