using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\w+)";
string input = @"""1 2013-07-25 11599"" CLOSED
""2 2013-07-25 256"" PENDING_PAYMENT
""3 2013-07-25 12111"" COMPLETE
""4 2013-07-25 8827"" CLOSED
""5 2013-07-25 11318"" COMPLETE
""6 2013-07-25 7130"" COMPLETE
""7 2013-07-25 4530"" COMPLETE
""8 2013-07-25 2911"" PROCESSING
""9 2013-07-25 5657"" PENDING_PAYMENT
""10 2013-07-25 5648"" PENDING_PAYMENT
""11 2013-07-25 918"" PAYMENT_REVIEW
""12 2013-07-25 1837"" CLOSED
";
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