Optionally, after beginning to handle a text portion, previous text portions are not handled.
Generating the plurality of bit masks comprises generating bit masks for each of the possible characters in the text and selecting bit masks corresponding to characters in the pattern.