Patent ID: 8046532

Claim:
A method comprising: detecting a match of sequential input characters with sequential characters stored in memory locations of a content addressable memory (CAM); tracking a potential string match in progress, wherein a potential string match comprises two to N−1 sequential input characters matching with two to N−1 sequential characters stored in the memory locations of the CAM; tracking the length of the potential string match; tracking the length of a primary match and a secondary match, wherein the primary match and the secondary match are matches of N or more sequential characters; allowing each of a potential string match to transition to a secondary match if the potential string match can transition from N−1 to N character matches on the next input character after a primary match has begun; terminating a primary match when the next sequential character stored in the CAM does not match a current input character; terminating a secondary match when the next sequential character stored in the CAM does not match the current input character; determining the longest string match of a primary match or a secondary match; and outputting the address of the determined longest match when the primary match and the secondary match have terminated.