Skip to content

Instantly share code, notes, and snippets.

@jacqinthebox
Last active December 26, 2015 23:49
Show Gist options
  • Select an option

  • Save jacqinthebox/7233721 to your computer and use it in GitHub Desktop.

Select an option

Save jacqinthebox/7233721 to your computer and use it in GitHub Desktop.
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();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment