using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"("",(?=(?:[^\""]*\""[^\""]*\"")*[^\""]*$)"", -1)";
string input = @"DUS-FRONTARENA@20230904,SA_GREEKS_CRR2_ECB,SA_GREEKS_CRR2_ECB_USD,1100accf-4b74-475a-a9bd-9ccc6c434030,CRFRTBEAD,USD,5274107.002018,7000000000435111897,OFFICIAL_spot_0,NULL,NULL,NULL,NULL,NULL,TERNA - RETE ELETTRICA NAZIONALE SOCIETA' PER AZI,N,20230905104510489,NULL,USD,7000000000435111897,NULL
";
Match m = Regex.Match(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