using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?>[^;]*;){5}(?>[^,]*,){2}\s*[^,^\s]*\s*([^,^;]*)(?>[^;^\r^\n]*)";
string input = @"2009311179;2723088770;Комсомольское отделение филиала ПАО ""ДЭК""-""Хабаровскэнергосбыт"";2018-10-23;0de159ee-ebc3-4a1e-81ca-63d8fe5a8558;1093163;Хабаровский край, Солнечный район, п. Хурмули, ул. Школьная, д. 20;;Солнечный;;;421;;Школьная;529;20;;;7;1;16;2012-08-01;65,1;41,3;2012-08-01;3;1;12DEC0701E80601161;;2012-08-01;;Капарушкин;Виталий;Викторович;;;4;4;;2012-08-01";
RegexOptions options = RegexOptions.IgnorePatternWhitespace;
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