Well, therefore, firstly, I want to thank everyone for helping me so much in the last couple of weeks, here's another one !!!
I have a file and I use Regex to find out how many times the term "TamedName" appears. This is the easy part :)
I originally set it up this way
StreamReader ff = new StreamReader(fileName); String D = ff.ReadToEnd(); Regex rx = new Regex("TamedName"); foreach (Match Dino in rx.Matches(D)) { if (richTextBox2.Text == "") richTextBox2.Text += string.Format("{0} - {1:X} - {2}", Dino.Value, Dino.Index, ReadString(fileName, (uint)Dino.Index)); else richTextBox2.Text += string.Format("\n{0} - {1:X} - {2}", Dino.Value, Dino.Index, ReadString(fileName, (uint)Dino.Index)); }
and he returned completely wrong index points, as pictured here

I'm pretty sure that I know why this is done, perhaps because converting everything from the binary to a string, obviously, not all characters will be translated to reset the actual index, so trying to link this back does not work at all ... Problem, I DO NOT know how to use Regex with a binary file and whether it translates correctly :(
I use Regex vs a simple search function because the difference between each occurrence of "TamedName" is too complex for the code in the function.
Hope you guys can help me with this :( I'm running out of ideas!
regex streamreader
Brandon Printiss Jul 12 '15 at 3:33 2015-07-12 03:33
source share