title: Regex match and split string in C#
body: <p>I have some ASCII documents in the following format:</p>
  
  <pre><code>[section heading]
  paragraphs......
  
  [section heading]
  paragraphs......
  ...
  </code></pre>
  
  <blockquote>
    <p>Note: heading text are always enclosed in some specific pattern (e.g. <code>[</code> <code>]</code> in the above example)</p>
  </blockquote>
  
  <p>I want to split the file into separate sections (each with a <em>heading</em> and the <em>content</em>).</p>
  
  <p>What would be the most efficient way to parse the above document?</p>
  
  <p>Using <code>Regex.Match()</code> I can extract the headings, but not the subsequent text content.</p>
  
  <p>Using <code>Regex.Split()</code> I can grab the content, but not the related headings.</p>
  
  <p>Is it possible combine these two <code>Regex</code> methods to parse the document? Are there better ways to achieve the same?</p>