I need to process some files (log files mainly) and I got to use regex in each line. I use
using (FileStream fs = File.Open("logs.txt", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
using (BufferedStream bs = new BufferedStream(fs))
using (StreamReader sr = new StreamReader(bs))
{
string line;
while ((line = sr.ReadLine()) != null)
{
// use regex and add create new file..
}
}
But in the logs I have "name changes" as well, so if someone changed their name I need to process the logs again, with an other name this time. Can I make it start reading from a certain line so it can save me some time doing this?