static void Main(string[] args) {
var text = File.ReadAllLines(@"C:\Users\jpor01\dev\grh.txt");
var file = new StreamWriter(@"C:\Users\jpor01\dev\grh-out.txt", true);
foreach (string line in text)
{
var pattern = Regex.IsMatch(line, @"\b(0x00000005)\b", RegexOptions.IgnoreCase );
if (pattern == true)
{
file.WriteLine(line);
}
}
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
file.Close();
System.Console.ReadKey();
}