1. A computer implemented method for recognizing a search pattern in an input string of bits, said method comprising the steps of: A) selecting a portion of said string of bits as a currently selected portion; B) selecting a first set of masked occurrence patterns based on said search pattern and those bits of said string of bits immediately preceding said currently selected portion, said first set of masked occurrence patterns including one or more masked occurrence patterns, each representing a plurality of bit patterns that would be present in said currently selected portion if at least part of said search pattern is contained in said currently selected portion; C) determining if said currently selected portion contains any of said first set of masked occurrence patterns; and D) determining if said string of bits contains said search pattern based on whether said currently selected portion contains any of said first set of masked occurrence patterns.