If you want the general case of video followed by a digit without explicitly listing all the combinations there are a couple of methods from Enumerable that you could use in combination with a regular expression.
hash.keys
is an array of the keys from hash
and ^video\d$
matches video followed by a digit.
# true if the block returns true for any element
hash.keys.any? { |k| k.match(/^video\d$/ }
or
# grep returns an array of the matching elements
hash.keys.grep(/^video\d$/).size > 0
grep
would also allow you to capture the matching key(s) if you needed that information for the next bit of your code e.g.
if (matched_keys = hash.keys.grep(/^video\d$/)).size > 0
puts "Matching keys #{matched_keys.inspect}"
Furthermore, if the prefix of key we're looking for is in a variable rather than a hard coded string we can do something along the lines of:
prefix = 'video'
# use an interpolated string, note the need to escape the
# \ in \d
hash.keys.any? { |k| k.match("^#{prefix}\\d$") }