A method and system for ensuring system security is disclosed. The method
and system split a regular expression that corresponds to a number of
patterns into sub-expressions. The dependency relationships among the
finite automata that correspond to the sub-expressions are maintained.
Then, as data units are put through these finite automata in a sequence
that is based on the dependency relationships, suspected data units are
identified. 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. Depending on the result of identifying the
suspected data units, different actions are performed.