On 8/3/07, Todd Burch <promos / burchwoodusa.com> wrote:
>
> I want to parse these names and determine that "item" is the common
> prefix.
>
If I understood you correctly,  I think this will do it.

r = ["itemz14","item004","item002","item002b","item 5","itemize this"]

s = []
a ,b = r.max.split(//), r.min.split(//)
a.each_with_index{|x,y|s << y if x != b[y]}
(0...s[0]).each {|x| print a[x]}

Harry

-- 
A Look into Japanese Ruby List in English
http://www.kakueki.com/