1. A method 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 method comprising: selecting a character group from the input text string; 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; generating a next state and a result code in response to the comparing; and selectively repeating comparison of the same selected character group with the plurality of character entries and outputting 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.
1. A method 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 method comprising: selecting a character group from the input text string; 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; generating a next state and a result code in response to the comparing; and selectively repeating comparison of the same selected character group with the plurality of character entries and outputting 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. 3. The method of claim 1 , wherein a rollback pointer is not used during the selectively repeating comparison.