title: Cannot get regular expression work correctly with multiline
body: <p>I have a quite big XML output from an application. I need to process it with my program and then feed it back to the original program. There are pieces in this XML which needs to be filled out our replaced. The interesting part looks like this:</p>
  
  <pre><code>&lt;sys:customtag sys:sid="1" sys:type="Processtart" /&gt;
      &lt;sys:tag&gt;value&lt;/sys:tag&gt;
      here are some other tags
      &lt;sys:tag&gt;value&lt;/sys.tag&gt;
  &lt;sys:customtag sys:sid="1" sys:type="Procesend" /&gt;
  </code></pre>
  
  <p>and the document contains several pieces like this.</p>
  
  <p>I need to get all XML pieces inside these tags to be able to make modifications on it. I wrote a regular expression to get those pieces but it does not work:</p>
  
  <pre><code>XmlDocument xmlDoc = new XmlDocument();
  xmlDoc.Load(@"output.xml");
  Regex regExp = new Regex(@"&lt;sys:customtag(.*?)Processtart(.*?)/&gt;(.*?)&lt;sys:customtag (.*?)Procesend(.*?)/&gt;", RegexOptions.Multiline &amp; RegexOptions.IgnorePatternWhitespace &amp; RegexOptions.CultureInvariant);
  MatchCollection matches = regExp.Matches(xmlDoc.InnerXml);
  </code></pre>
  
  <p>If I leave the whole stuff in one line and call this regexp without the multiline option, it does find every occurences. By leaving the file as it is and set the multiline option, it does not work. What is the problem, what should I change? Or is there any easier way to get the XML parts between these tags without regexp?</p>