using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?m)^Art\..*(\n(?!Art\.).*)*";
string input = @"Art. 15 Gegenstand Dieses Gesetz regelt die Bekämpfung der Geldwäscherei im Sinne von Artikel 305 bis des Strafgesetzbuches6 (StGB), die Bekämpfung der Terrorismusfinanzierung im Sinne von Artikel 260quinquies Absatz 1 StGB und die Sicherstellung der Sorgfalt bei Finanzgeschäften.
Art. 22 Geltungsbereich 1 Dieses Gesetz gilt: a. für Finanzintermediäre; b. für natürliche und juristische Personen, die gewerblich mit Gütern handeln und dabei Bargeld entgegennehmen (Händlerinnen und Händler).";
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