> 294
キーが正規表現含むとおかしくなるから
quoteしたほうがいい

pattern = Regexp.compile(table.keys.collect {|key| Regexp.quote(key) }.join('|'))