8. The non-transitory computer-readable storage medium of claim 7 wherein the tail-first search comprises searching a string to match the first search string or the second search string from an end of the first search string or the second search string.
7. A non-transitory computer-readable storage medium, having instructions stored therein, which when executed, cause a computer system to perform operations comprising: receiving at least a first search string and a second search string, where a first length of the first search string is different than a second length of the second search string; and constructing, by a computer system, a matching string machine comprising a plurality of states, wherein the constructing comprises: processing the first search string and the second search string with a tail-first search, associating an initial state of the matching string machine with a pattern, putting each possible character into a point in the pattern, matching each possible character against the first search string and the second search string to identify a match point, and generating a state of the matching string machine in view of the match point; wherein each of the plurality of states has a respective set of state transitions, and wherein each of the respective set of state transitions specifies a shift and a next state that are based on the first length, the second length, and characters of the first search string and the second search string, and wherein at least one of the plurality of states is an accepting state.