using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"=+\n(.+)\n=+";
string input = @"========================================
E:\#\1125 (2007) Victims Of Forgetting\
========================================
!Moros 1125 - 01 - Intro.mp3 ::INFO:: 442Kb
!Moros 1125 - 02 - Resp=ect For=.mp3 ::INFO:: 2.30Mb
=!Moros 1125 - 03 - Victims Of For=getting.mp3 ::INFO:: 2.74Mb
!Moros 1125 - 04 - Broken Wings.mp3 ::INFO:: 1.49Mb
!Moros 1125 - 05 - Rotten World.mp3 ::INFO:: 2.35Mb
!Moros 1125 - 06 - 1125crew.mp3 ::INFO:: 2.72Mb
!Moros 1125 - 07 - Around You.mp3 ::INFO:: 2.14Mb
========================================
E:\#\1125 (2007) Victims Of Forgetting\
========================================
!Moros 1125 - 01 - Intro.mp3 ::INFO:: 442Kb
!Moros 1125 - 02 - Respect For.mp3 ::INFO:: 2.30Mb
!Moros 1125 - 03 - Victims Of Forgetting.mp3 ::INFO:: 2.74Mb
!Moros 1125 - 04 - Broken Wings.mp3 ::INFO:: 1.49Mb
!Moros 1125 - 05 - Rotten World.mp3 ::INFO:: 2.35Mb
!Moros 1125 - 06 - 1125crew.mp3 ::INFO:: 2.72Mb
!Moros 1125 - 07 - Around You.mp3 ::INFO:: 2.14Mb
========================================
E:\#\1125 (2007) Victims Of Forgetting\
========================================
!Moros 1125 - 01 - Intro.mp3 ::INFO:: 442Kb
!Moros 1125 - 02 - Respect For.mp3 ::INFO:: 2.30Mb
!Moros 1125 - 03 - Victims Of Forgetting.mp3 ::INFO:: 2.74Mb
!Moros 1125 - 04 - Broken Wings.mp3 ::INFO:: 1.49Mb
!Moros 1125 - 05 - Rotten World.mp3 ::INFO:: 2.35Mb
!Moros 1125 - 06 - 1125crew.mp3 ::INFO:: 2.72Mb
!Moros 1125 - 07 - Around You.mp3 ::INFO:: 2.14Mb";
foreach (Match m in Regex.Matches(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