結果 : substring matching algorithm