1. An apparatus comprising: a plurality of programmable processing units to receive a pre-specified string to generate content addressable memory entries based on non-contiguous portions of the pre-specified string, receive messages, and generate sub-messages from the messages, wherein length (K) of each of the sub-message is determined based on a length (Ls) of the pre-specified string, wherein K is less than Ls, a content addressable memory coupled to each of the plurality of programmable processing units to compare the content addressable memory entries and the sub-messages to generate hit information, and a programmable control unit coupled to each of the programmable processing units and the content addressable memory, wherein the programmable control unit is to determine the presence of the pre-specified string in the message based on the hit information.