1. A search device, which generates one or more set including a first character string and a second character string by dividing a character string inputted as a registered pattern, obtains a plurality of hash values by applying a plurality of hash functions to said first character string, determining an offset corresponding to a length of said second character string, and calculating a plurality of numerical values by applying a predetermined operation to said plurality of hash values and said offset, and treats said plurality of numerical values which are calculated as a plurality of addresses in a vector and updating each content corresponding to said plurality of addresses to a numerical value which is different from an initial value.