using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\d{6}\_\d{9})\=.*(gurlan,danu)";
string input = @"[7384] [Birthdays]
[7384] 180528_201747263=198202141300
[7384] 180528_210749326=19840222
[7384] 180528_211723352=19831207
[7384] 180528_211845500=201607072350
[7384] 180528_212024116=19591231
[7384] 180528_212038465=19590323
[7384] 180528_213357273=19590811
[7384] 180528_213701342=19780608
[7384]
[7384] [NameSurname]
[7384] 180528_201747263=Gurlan V. Vasile aka. Licuta
[7384] 180528_210749326=Gurlan (Enea) V. Maria aka Mariana
[7384] 180528_211723352=Danu (Gurlan) F. Oana Nicoleta aka. Nikol
[7384] 180528_211845500=Gurlan V. Rebecca-Ioana
[7384] 180528_212024116=Gurlan P. Vasile
[7384] 180528_212038465=Nucu (Gurlan) N. Maria
[7384] 180528_213357273=Bogdan (Danu) G. Elena
[7384] 180528_213701342=Enea D. Ioan Dorin
";
RegexOptions options = RegexOptions.Multiline | RegexOptions.IgnoreCase;
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