using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"\((\d+), 2020";
string input = @"(190497, 2020, 'FedEx First Overnight', '2', '2', NULL, 1, 'lb', 'letter', NULL, 55.35, NULL, NULL, NULL, NULL),
(190498, 2020, 'FedEx Priority Overnight', '2', '2', NULL, 1, 'lb', 'letter', NULL, 25.35, NULL, NULL, NULL, NULL),
(190499, 2020, 'FedEx Standard Overnight', '2', '2', NULL, 1, 'lb', 'letter', NULL, 24.85, NULL, NULL, NULL, NULL),
(190500, 2020, 'FedEx 2Day AM', '2', '2', NULL, 1, 'lb', 'letter', NULL, 19.40, NULL, NULL, NULL, NULL),
(190501, 2020, 'FedEx 2Day', '2', '2', NULL, NULL, 'lb', 'letter', NULL, NULL, NULL, NULL, NULL, NULL),";
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