A trap matrix searches the entire contents of a data stream for a pattern that
matches the pattern for a search term. In those circumstances where there is a
match between patterns of the data stream and the search term, the method and system
can proceed to an exact match operation. In particular, a pointer matrix and a
corresponding active control matrix are generated according to a set of terms in
a rule table. Data is sequenced through the trap matrix according to the hierarchy
of its trap elements. The trap elements perform a pattern match check between the
sequenced data stream and any search term in the set of terms in the rule table.
Results from a positive pattern match are preferably communicated from the matching
trap element to an exact match lookup.