using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?:^\d+.*\R)?(?:4-Diepi|5-Mts|.*\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\d{4}\b.*)$(*SKIP)(*F)|^\d+.*\R(\d+.*)$";
string input = @"Peie
71,176,953
T-re
71,173,557
5-Mts
41,653,495
45678
Sia
36,136,829
36,100,829
4-Diepi
120,829
uteCra
36,100
Oct2018";
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