There are no hacks, just better and worse algorithms for searching. The way I do this, and I've done this multiple times, is to create a list (std C template list or MFC CStringList) of words that make up the phrase. Then search for words that match the first item. On a match, divert into a sub loop that checks each item in the list with the next word on the page. Its easy to add simple variations like no-case and partial word checking. I'll typically use the same incrementer in the subloop so the phrase matches don't overlap. But you could do it differently depending on the search requirements. I have also done this by pre-processing the text on the page into distinct blocks of text to ensure the search only happens within a text block. Of course this technique will not catch phases broken across pages, which requires identifying paragraphs, headers and footers.