Regex match multiple Group.Captures with multiline

I want get all captures from group by 5 lines + empty line between each capture.
I was trying that way, but receive only first capture. When I deleting first capture from test string I receive next capture and so on, so seems my regexp is right to match.
What am I missed?

static void Main(string[] args)
    {           
        var strBackups = @"wbadmin 1.0 - Backup command-line tool
(C) Copyright 2013 Microsoft Corporation. All rights reserved.

Backup time: 01.09.2015 11:51 
Backup target: 1394/USB Disk labeled BIGGER2(F:)
Version identifier: 09/01/2015-06:51
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {060e3b44-7b80-49bf-97c4-3f3b9908dec6}

Backup time: 06.09.2015 10:36 
Backup target: 1394/USB Disk labeled BIGGER2(F:)
Version identifier: 09/06/2015-05:36
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {64af3693-362d-42dc-ae5f-566b3f2d40be}

Backup time: 06.09.2015 11:00 
Backup target: 1394/USB Disk labeled BIGGER2(F:)
Version identifier: 09/06/2015-06:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {d9d50a01-6907-40a1-9c57-1f45de76b9ec}

";

        var regBackups = new System.Text.RegularExpressions.Regex(".+rn.+rnrn(.+rn.+rn.+rn.+rn.+rn)+",
            System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.Multiline
        );

        var match = regBackups.Match(strBackups);
        if (match.Success)
        {
            for (var i = 1; i < match.Groups.Count; i++)
            {
                foreach (var c in match.Groups[i].Captures)
                {
                    Console.WriteLine("=============================");
                    Console.WriteLine(c);
                    Console.WriteLine("=============================");
                }
            }
        }
        else
            Console.WriteLine("<not matched>");
    }

Sorry for broken format by multiline strings

Code looks like that without broke formatting:
Code


Source: regex

Leave a Reply