First of all, this isn't a text file, it is a binary file. Secondly, substrings can overlap. In the sequence 0010010 the substring 0010 occurs twice. /David