Patent ID: 8301604

Claim:
An apparatus comprising: a first memory configured to store a plurality of entries, wherein the entries comprise portions of a plurality of patterns, wherein the first memory is a content-addressable memory (CAM), and wherein a first pattern of the plurality of patterns is longer than a single one of the plurality of entries of the first memory; a second memory, separate from the first memory, configured to store a plurality of shift values, each of the plurality of shift values corresponding to a respective one of the entries of the first memory; and a controller configured to generate a first key based on a received string, apply the first key to the first memory to select one of the entries of the first memory, in response to the selected one of the entries of the first memory, retrieve the corresponding shift value from the second memory, in response to the retrieved shift value being equal to a predetermined value, identify an initial match, and in response to the initial match corresponding to the first pattern (i) apply at least one adjacent key based on the received string to the first memory, and (ii) declare a complete match when each of the shift values corresponding to the at least one adjacent key is equal to the predetermined value.