using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"\b[A-Fa-f0-9]{64}\b";
string input = @"MD5 ed076287532e86365e841e92bfc50d8c
SHA1 2ef7bde608ce5404e97d5f042f95f89f1c232871
SHA256 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
ssdeep3:aBn:aB
File size 12 bytes ( 12 bytes )
File type Text
Magic literalASCII text, with no line terminators
TrID Unknown!
";
foreach (Match m in Regex.Matches(input, pattern))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx