Parsing Large Text file

  • Thread starter Thread starter Rahul
  • Start date Start date
R

Rahul

CSharp Gurus,
Is there any designed classes for parsing large file of
size 1GB? What is the best design to do the following
operation. I would like to look for the lines that match
any of the given 1000 independent multi-line regular
experessions.
I would appreciate any help!!!
 
Rahul said:
CSharp Gurus,
Is there any designed classes for parsing large file of
size 1GB? What is the best design to do the following
operation. I would like to look for the lines that match
any of the given 1000 independent multi-line regular
experessions.
I would appreciate any help!!!

Ouch!
What about this?

Regex [] regexes = Load1000RegEx();
StreamReader sr = new StreamReader("ReallyBIGFile.txt");
string Line;
while((Line=sr.ReadLine())!=null)
{
foreach(Regex re in regexes)
{
DoWork(re.Match(line));
}
}
 
Back
Top