Mark Woodward wrote: .... > > # x seemed to include empty strings so only add x to the array if not "" > foo.split(/\s*<[^<>]*>\s*/).reject{|x| a.insert(-1,x) if x != ""} Hmm, here's the first improvement? Seems I can use a << x to append to an array: # x seemed to include ""??? so only add x to the array if not "" foo.split(/\s*<[^<>]*>\s*/).reject{|x| a << x if x != ""} -- Mark