# File lib/hirb/util.rb, line 36
    def choose_from_array(array, input, options={})
      options = {:splitter=>","}.merge(options)
      return array if input[/^\s*\*/]
      result = []
      input.split(options[:splitter]).each do |e|
        if e =~ /-|\.\./
          min,max = e.split(/-|\.\./)
          slice_min = min.to_i - 1
          result.push(*array.slice(slice_min, max.to_i - min.to_i + 1))
        elsif e =~ /\s*(\d+)\s*/
          index = $1.to_i - 1
          next if index < 0
          result.push(array[index]) if array[index]
        end
      end
      result
    end