using System;
public class Program {
public static void Main() {
string texto = @"From: .... blabla bla
Message: blablabalab
//linha em branco
From: .... blabla bla
Message: blablabalab
//linha em Branco
From: .... blabla bla
Message: blablabalab";
string[] pedacos = texto.Split(new string[] { "From: ", "Message: " }, StringSplitOptions.RemoveEmptyEntries);
foreach (var pedaco in pedacos){
Console.WriteLine(pedaco);
}
Console.ReadLine();
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFByb2dyYW0gewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKSB7CgkJc3RyaW5nIHRleHRvID0gQCJGcm9tOiAuLi4uIGJsYWJsYSBibGEKCQlNZXNzYWdlOiBibGFibGFiYWxhYgoJCS8vbGluaGEgZW0gYnJhbmNvCgkJCgkJRnJvbTogLi4uLiBibGFibGEgYmxhCgkJTWVzc2FnZTogYmxhYmxhYmFsYWIKCQkKCQkvL2xpbmhhIGVtIEJyYW5jbwoJCQoJCUZyb206IC4uLi4gYmxhYmxhIGJsYQoJCU1lc3NhZ2U6IGJsYWJsYWJhbGFiIjsKCQkKCQlzdHJpbmdbXSBwZWRhY29zID0gdGV4dG8uU3BsaXQobmV3IHN0cmluZ1tdIHsgIkZyb206ICIsICJNZXNzYWdlOiAiIH0sIFN0cmluZ1NwbGl0T3B0aW9ucy5SZW1vdmVFbXB0eUVudHJpZXMpOwoJCWZvcmVhY2ggKHZhciBwZWRhY28gaW4gcGVkYWNvcyl7CgkJCUNvbnNvbGUuV3JpdGVMaW5lKHBlZGFjbyk7CiAgICAgICAgfQogICAgICAgIENvbnNvbGUuUmVhZExpbmUoKTsKCX0KfQ==