how to deal with multiline string
<p>I have a method which returns a multiline string..I've tested with parameter and without parameter..without parameter (with constant) it works..here is the function</p>

<pre><code>public string AppComments()
        {
           string teststring = @"Nelly Thomas (Approve) 12/27/2012 8:50 PM - 12/27/2012 8:52 PM
                               (Nelly Thomas) LazyApproval by nelly.thomas@joshworld.local Approved

                                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 
                                when an unknown printer took a galley of type and scrambled it to make a type specimen book";

              Regex reg = new Regex(@"(.+)\(.+\)\s((\d\d\/){2}\d{4}\s\d{1,2}:\d\d\s\w\w)\s-\s.+[\n|\r].+[\n|\r]{2}((?:.|\n)+)", RegexOptions.IgnoreCase | RegexOptions.Multiline);

              string returnstring = reg.Match(teststring).Groups[1].Value + reg.Match(teststring).Groups[2].Value + reg.Match(teststring).Groups[4].Value.ToString();

            return returnstring;
        }
</code></pre>

<p>But when I pass the followig text it never returns any value..it appears blank..i guess the value I am passing inside the method has no multi-line literal?</p>

<pre><code>Nelly Thomas (Approve) 12/27/2012 8:50 PM - 12/27/2012 8:52 PM
(Nelly Thomas) LazyApproval by nelly.thomas@joshworld.local Approved

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 
when an unknown printer took a galley of type and scrambled it to make a type specimen book
</code></pre>

<p>Here is the function with parameter</p>

<pre><code>public string AppComments(string mystring)
        {

              Regex reg = new Regex(@"(.+)\(.+\)\s((\d\d\/){2}\d{4}\s\d{1,2}:\d\d\s\w\w)\s-\s.+[\n|\r].+[\n|\r]{2}((?:.|\n)+)", RegexOptions.IgnoreCase | RegexOptions.Multiline);

              string returnstring = reg.Match(mystring).Groups[1].Value + reg.Match(mystring).Groups[2].Value + reg.Match(mystring).Groups[4].Value.ToString();

            return returnstring;
        }
</code></pre>
