1. A method of detecting a pattern in a data stream comprising a sequence of events, the method comprising: receiving, at a processing system, predicate information, the predicate information specifying a predicate associated with each symbol in a set of one or more symbols; receiving, at the processing system, a regular expression specifying a pattern, the regular expression comprising one or more symbols from the set of symbols; determining, at the processing system, a pattern type based upon the regular expression and the predicate information; determining, at the processing system, a first technique from a plurality of techniques based upon the pattern type; and using the first technique for detecting the pattern in the data stream.