# File lib/uri_template/rfc6570/expression.rb, line 112
    def extract(position,matched)
      name, expand, max_length = @variable_specs[position]
      if matched.nil?
        return [[ name , extracted_nil ]]
      end
      if expand
        it = URITemplate::RegexpEnumerator.new(self.class.hash_extractor(max_length), :rest => :raise)
        if position == 0
          matched = "#{self.class::SEPARATOR}#{matched}"
        end
        splitted = it.each(matched)\
          .map do |match|
            raise match.inspect if match.kind_of? String
            [ decode(match[1]), decode(match[2], false) ]
          end
        return after_expand(name, splitted)
      end

      return [ [ name, decode( matched ) ] ]
    end