But the problem is that my regular expression strips even "\r\n", so I can't possibly split it up by Environment.NewLine, so how can I achieve this behavior?

Edit: I overlooked one thing. I want to keep whitespace when splitting in <Message body> or any other split strings, so I actually need to keep whitespace after the first character of the last colon but before the last character of \r\n...for example, <Message body> or Test 3.txt should preserve whitespace.

Edit: I would like to use a regular expression first, before splitting,

-1 no need for a while loop this can be done using Split Function
–
MethodManAug 21 '14 at 19:19

While satisfying this constraint? "Edit: I would like to use a regular expression first, before splitting." Also, you're solution strips the space between "<Message" and "body>".
–
Wyatt EarpAug 21 '14 at 19:25

yes it does I am not sure what you're talking about perhaps you did not run the code to test it yourself I just ran it and I yield the same results that the OP does per what he was expecting
–
MethodManAug 21 '14 at 21:43