1. A computer-implemented method for implementing regular expression matching using ternary content-addressable memory devices, comprising: receiving a set of regular expressions that specify characters to be extracted from data packets; constructing a deterministic finite automaton from the set of regular expressions; building a state transition table for each node of the deterministic finite automaton, the table having an input field having a fixed number of bits for encoding characters to be extracted from data packets; combining the state transition tables into a single lookup table; instantiating the lookup table in a ternary content-addressable memory device.