Methods and apparatuses for regular expression searching are described. A
tree structure is generated representing a string of characters. A character from
a data stream is compared to a root node of the tree structure. A state machine
is activated if the character matches the root node of the tree structure. Subsequent
characters from the data stream are compared, with the state machine, to subsequent
nodes of the tree structure.