任意の文字列の正規表現をまとめてつくる

 a = %w(banana orange apple) #=> ["banana", "orange", "apple"]

 r = Regexp.union(a.map{|e| /\A#{Regexp.escape(e)}\z/})  #=> /(?-mix:\Abanana\z)|(?-mix:\Aorange\z)|(?-mix:\Aapple\z)/

 "apple" =~ r     #=> 0

 "bananana" =~ r #=> nil