1. A method 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.