From: Li Chen Date: 2008-10-31T06:14:51+09:00 Subject: how to sort this array Hi, I have an array containing files names. How do I sort them so that I can get the expected results? Thanks, Li ############# files=[ "c:/ruby/self/2004/20.txt", "c:/ruby/self/2004/3.txt", "c:/ruby/self/2004/2.txt", "c:/ruby/self/2004/10.txt", "c:/ruby/self/2004/1.txt" ] expected results: [ "c:/ruby/self/2004/1.txt", "c:/ruby/self/2004/2.txt", "c:/ruby/self/2004/3.txt", "c:/ruby/self/2004/10.txt", ] "c:/ruby/self/2004/20.txt", -- Posted via http://www.ruby-forum.com/.