1. A method of identifying a complex string in a data stream, the method encoded into instructions stored in a processor-readable medium coupled to a processor, the method comprising: segmenting said complex string into a set of string segments and a suffix, each string segment comprising a prefix and a simple string, where said prefix includes indefinite characters and said suffix includes indefinite characters; ascertaining congruence of said prefix with a corresponding portion of said data stream; generating an array of bitmasks, each bitmask associated with a string segment in said set of string segments, said bitmask indicating a location index of an end character of said each string segment; associating a Boolean state variable with said complex string; locating a current simple-matchinq position in said data stream at which at least one simple string belonging to said complex string terminates; initializing a current mask as an opaque mask; performing a logical OR operation of said current mask with selected bitmasks corresponding to said at least one simple string to produce a composite current mask; determining a gap between said current simple-matching position and a previous simple-matchinq position; left-shiftinq each entry of said Boolean state variable by said gap, replacing each shifted entry by logical “0” and setting the rightmost entry to logical “1”; and updating said Boolean state variable according to a logical AND operation with said composite current mask.
1. A method of identifying a complex string in a data stream, the method encoded into instructions stored in a processor-readable medium coupled to a processor, the method comprising: segmenting said complex string into a set of string segments and a suffix, each string segment comprising a prefix and a simple string, where said prefix includes indefinite characters and said suffix includes indefinite characters; ascertaining congruence of said prefix with a corresponding portion of said data stream; generating an array of bitmasks, each bitmask associated with a string segment in said set of string segments, said bitmask indicating a location index of an end character of said each string segment; associating a Boolean state variable with said complex string; locating a current simple-matchinq position in said data stream at which at least one simple string belonging to said complex string terminates; initializing a current mask as an opaque mask; performing a logical OR operation of said current mask with selected bitmasks corresponding to said at least one simple string to produce a composite current mask; determining a gap between said current simple-matching position and a previous simple-matchinq position; left-shiftinq each entry of said Boolean state variable by said gap, replacing each shifted entry by logical “0” and setting the rightmost entry to logical “1”; and updating said Boolean state variable according to a logical AND operation with said composite current mask. 17. The method of claim 1 , further comprising producing a set of descriptors of said string segment; wherein the detecting further comprises detecting the presence of said complex string using said descriptors.