The Boyer-Moore string matching algorithm

 

  • The Boyer-Moore string matching algorithm uses both the Bad Character Match heuristic and the Good Suffix Match heuristic

  • The shift amount when there is a mismatch is equal to:

      SHIFT = Max( BadCharShift(), GoodSuffixShift() )