I'm trying to get paragraphs from a string in C# with Regular Expressions. By paragraphs; I mean string blocks ending with double or more \r\n. (NOT HTML paragraphs <p>)...
Here is a sample text:
For example this is a paragraph with a carriage return here
and a new line here.
At this point, second paragraph starts. A paragraph ends if double or more \r\n is matched or
if reached at the end of the string ($).
I tried the pattern:
Regex regex = new Regex(@"(.*)(?:(\r\n){2,}|\r{2,}|\n{2,}|$)", RegexOptions.Multiline);
but this does not work. It matches every line ending with a single \r\n. What I need is to get all characters including single carriage returns and newline chars till reached a double \r\n.