There some times appears a task when you have a sequence of object and you need perform some action when a particular pattern (subsequence?) occurs.
As more concrete example we can imagine a log monitoring solution which should alert when a predefined sequence of messages is detected (A followed by B, followed by C, but no D in the middle).
This sounds a bit like CEP, but a) no need for real-time processing; b) no large volumes.
What patterns\algorithms exists to solving problems of this kind? Is there a well-known name for the problem (so that i can search for solutions myself)?