using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"\(\(\(?([^}]*?)\)\)\)";
string input = @"((Short Title (in Navigation & Breadcrumb))) Pflanzen & Samen
((Post-Text)) Hast du unser Osterschoggi-Sortiment schon probiert? ((Schleckmaul))
[Ceci est un ((non visible)) (test)]
[[Ceci est un ((non visible)) (test)]]
Ceci est un [[visible ((non visible))]] (test)
Ceci est un ((non visible [non visible])) (test)
((Headline))
((non visible))
Ceci doit être traduit
((Sternchentext))
*Mit Cashback Fr. 39.90, Rückvergütung (Überweisung) einlösbar unter canon.ch/summer, gültig von 15.2. bis 15.5.2021 ((maximal 140 Zeichen inkl. Leerzeichen))
Lieferung per Paketkurier (Direktlieferung (normal))
";
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