5. The apparatus of claim 4 , wherein the means for selectively repeating further comprises: means for comparing the next state of the state machine with the plurality of state entries stored in the TCAM device.
4. An apparatus for detecting a match between an input text string and a pattern performed by a state machine implemented using a ternary content addressable memory (TCAM) device, the apparatus comprising: means for selecting a character group from the input text string; means for comparing the selected character group and a current state of the state machine with a plurality of character entries and a plurality of state entries, respectively, stored in the TCAM device; means for generating a next state and a result code in response to the comparing; and means for selectively repeating comparison of the same selected character group with the plurality of character entries and outputting of the result code if the result code indicates a match between the input text string and the pattern and is encoded with a repeat flag indicating that comparison of the same selected character group is to be repeated with the character entries corresponding to the next state.