On Sat, 2006-04-22 at 23:31 +0900, James Edward Gray II wrote: > On Apr 22, 2006, at 5:28 AM, Ross Bamford wrote: > > > $ ./munger.rb test.txt > > Attehcaed is my résmué. > > $ ./munger.rb test.txt > > Atthaceed is my réumsé. > > $ ./munger.rb test.txt > > Attacheed is my rémsué. > > $ ./munger.rb test.txt > > Attcaehed is my rémusé. > > $ ./munger.rb test.txt > > Attecahed is my rémsué. > > Why are the e's not moving? My solution scrambles only part of the inside of the word, depending on the word length, and favours keeping more from the start of the word. So with this example it's taking the six letter 'rémsué' and deciding to scramble 3 letters, 'msu' (remains after we take two from the start, one from the end). So with that input, the e's wouldn't be touched. I just didn't think about that before I posted - the second output I posted showed some longer accented words with the e's moving around properly :). -- Ross Bamford - rosco / roscopeco.REMOVE.co.uk