Hello!
Basically I need this program to go line by line down my text file and tell me if it sees "000-00-0000"......we use this as a dummy number otherwise the file wont process.
Right now the program will tell me it sees "000-00-0000" in the file but a few lines might actually be missing "000-00-0000"
Any suggestions on how to make it search line by line?
class Program
{
static void Main(string[] args)
{
string fName = @"C:\Users\cmoy\Desktop\WorkOrder_01102011.txt";
StreamReader testTxt = new StreamReader(fName);
string allRead = testTxt.ReadToEnd();
testTxt.Close();
string regMatch = "000-00-0000";
if (Regex.IsMatch(allRead,regMatch))
{
Console.WriteLine("found\n");
}
else
{
Console.WriteLine("not found\n");
}
Console.ReadLine();
}
}
}