http://qs1969.pair.com?node_id=11138463


in reply to Re: Suffix-prefix matching done right
in thread Suffix-prefix matching done right

then just loop until it crosses a threshold

then with A,B,X of OP's example, the correct result will be missed