Introduction - If you have any usage issues, please Google them yourself
BM algorithm is a better pattern matching algorithm. General, if we do not consider the length of pattern, a time complexity O (n) algorithm should be optimal, but the fact is not the case. BM algorithm can realize more efficient pattern matching. Analysis and experiments, BM-matching algorithm for those relatively large character set, and the mode string of characters appearing in less time, the efficiency of the fastest. Moreover, consider the KMP matching optimization, you can match the combination of KMP and BM match, and further improve efficiency.