Demonstration of Naive, KMP, and BM pattern matching algorithms, and their variations