7. An apparatus comprising: a processor for sampling text in a received packet and analyzing the sampled text using a sampled deterministic finite automata (DFA) to identify matches between a set of regular expressions and the text, the sampled DFA created with said regular expressions sampled at a sampling rate, the sampling rate calculated for said regular expressions using operations comprising selecting a minimum sampling rate from sampling rates computed for each of said regular expressions based on a minimum length of the text that can match said regular expression; and memory for storing said regular expressions and the sampling rate; wherein the minimum length comprises a sum of lengths of substrings in said regular expression.
7. An apparatus comprising: a processor for sampling text in a received packet and analyzing the sampled text using a sampled deterministic finite automata (DFA) to identify matches between a set of regular expressions and the text, the sampled DFA created with said regular expressions sampled at a sampling rate, the sampling rate calculated for said regular expressions using operations comprising selecting a minimum sampling rate from sampling rates computed for each of said regular expressions based on a minimum length of the text that can match said regular expression; and memory for storing said regular expressions and the sampling rate; wherein the minimum length comprises a sum of lengths of substrings in said regular expression. 12. The apparatus of claim 7 wherein the processor is further operable to process the received packet based on whether a match was found.