Patent ID: 8666930

Claim:
A string matching method by a string matching device comprising: dividing each of a plurality of target strings into at least one sub-string; dividing a prefix that is a most significant sub-string from the at least one sub-string and dividing other sub-strings excluding the prefix from the at least one sub-string for each respective target strings; setting a state value of each prefix and the other sub-strings; setting a next state value of each prefix based on the order of the prefix and the state value, and the other sub-strings based on the order of the other sub-strings and the state value; extracting a plurality of strings with different start positions from an input data stream; detecting a sub-string corresponding to at least one string from among the plurality of strings based on a state variable; updating the state variable with one next state value corresponding to the detected sub-string from among the next state values of the at least one sub-string; and detecting one of the target strings based on the state variable and the detected sub-string.