using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?P<ID>[A-Z0-9]{4})(?P<CATEGORY>0000[A-Z0-9]{1})(?P<TIMESTAMP>[0-9]{10})";
string input = @"D812E66E0000A13297539619F990000A1326011227538F0000A134114416231680000A1333737336D7AB0000A1367834926D1A90000A1340522218B4D40000A1339938392DD4C0000A1346574058C1A20000A134475357330810000A136293851756F20000A1329934748A71A0000A1383377560B3F90000A13460667155BBE0000A1370955439BF490000A1336724039A6E90000A132550239864440000A13827086085A3F0000A1353692293BB7C0000A136799576755110000A1327676142DA5B0000A13536535381E270000A1332164993941B0000A133802356236AF0000A1345444250FBC50000A134544825251590000A1355240920
";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
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