1. A method comprising: receiving, into an apparatus, a data packet comprising a string of characters, said apparatus comprising a plurality of states and at least one state for every character position in the string of characters; examining the characters in the string of characters for matches with a plurality of predefined values, beginning with an initial character; and executing forward exit transitions from any of the plurality of states based upon the examination of the characters, wherein a current state of the apparatus represents a count of a number of characters from the initial character of the string of characters.