1. A computer-implemented method of searching for a specified group of patterns in a data stream input into a computer system, the method comprising: identifying a multi-pattern rule for the group of patterns; inputting a data stream into a computer system, the computer system comprising one or more computer processor units; using first and second arrays of finite state machines executing on the one or more processor units, to scan the data stream for the patterns in the specified group of patterns, including splitting at least a first pattern of the specified group of patterns into a plurality of subpatterns, searching for the first pattern of the group of patterns using a first, pattern scanner function and a second, rule processor function, including using a compiler of the computer system to distribute the pattern scanner function to the first array of finite state machines and the rule processor function to the second array of finite state machines, using the first array of finite state machines, executing on the one or more processor units, to execute the pattern scanner function to scan the data stream for the subpatterns of said first pattern, and when all the subpatterns of the first pattern are found in the data stream, using the second array of finite state machines, executing on the one or more processor units, to execute the rule processor function to check if the subpatterns of the first pattern are found in the data stream in a specified order indicating that the first pattern is in the data stream; for each of the patterns in the specified group of patterns that are found in the data stream, sending a pattern identifier identifying said each pattern to the second array of finite state machines; and using the second array of finite state machines for determining if the patterns of the specified group of patterns are in the data stream in an order given by the identified multi-pattern rule.