KMP pattern serach