def self.intersection(cell, quantity)
case quantity
when '?''?' then ['', cell.map {|s| reduce(s)}.pick].pick
when :+, '+?''+?' then raise "Sorry, \"((...)|(...))+\" is too vague, try setting a range: \"((...)|(...)){1, 3}\""
when :*, '*?''*?' then raise "Sorry, \"((...)|(...))*\" is too vague, try setting a range: \"((...)|(...)){0, 3}\""
when Range then quantity.pick.of { cell.map {|s| reduce(s)}.pick } * ''
when Integer then quantity.of { cell.map {|s| reduce(s)}.pick } * ''
when nil then cell.map {|s| reduce(s)}.pick
end
end