Regex Matches with Anchors

Hey Guys!

I have a document in which dynamically entered many repetitions like the following:

Finanzierung 1:
Zusätzliche Produktauswahl:
123 45678 Test Geld -Voll 10J.-

Summe: in 100000 €
Zins: in 2,87 %
Tilgung: in 1,5 %

Sondertilgung: Einheit in € 2500

Now I want to find the word: Tilgung: With the anchor Finanzierung 1:

how to do this?

Hey @Beere_Plays

Check out this post:

If you still get stuck reach out and someone will assist :blush:




Please try this


System.Text.RegularExpressions.Regex.Match(str, "(?<=Finanzierung(.|\n)*Tilgung:).*").Value