title: C# pattern search
body: <p>I have a set of hexadecimal numbers that I would like to search a file, which each time this matches it stores the last offset address of the last byte found in the pattern from the text file.</p>
  
  <p>So for example, the pattern is '04 00 03 00 00 00 04 00 04 00 00 00 08 00' then each time this was found in the file then the last byte in the pattern which is '00' the offset is read in and stored in an array.</p>
  
  <p>Any help on this please, this has been driving me mad for months now.</p>
  
  <p>Thanks </p>
  
  <hr>
  
  <p>Thanks Svick It did work indeed ... It returned all the matches which were the offsets I needed to find.</p>
  
  <p>However, since I added little a bit of my code in, it stops on the first match and doesn't cycle through... Could someone please point out what is wrong and why it is stopping at the first match found</p>
  
  <p>Many thanks</p>