A method and system for ensuring system security is disclosed. The method
and system utilize a first processing unit to split a regular expression
that corresponds to a number of patterns into sub-expressions and
maintain the dependency relationships among the finite automata that
correspond to the sub-expressions. Then, the method and system utilize a
second processing unit to move the data units through these finite
automata in a sequence that is based on the dependency relationships to
identify the suspected data units. The suspected data units are the ones
containing content that collectively matches one or more of the
aforementioned patterns. Identification of the suspected data units is
based on the merged results of the finite automata.