title: C# substring in the middle
body: <p>I have the following data:</p>
  
  <pre><code>D:\toto\food\Cloture_49000ert1_10_01_2013.pdf
  D:\toto\food\Cloture_856589_12_01_2013.pdf
  D:\toto\food\Cloture_66rr5254_10_12_2012.pdf
  </code></pre>
  
  <p>How can I extract the date part? 
  For example: </p>
  
  <pre><code>D:\toto\food\Cloture_49000ert1_10_01_2013.pdf --&gt; 10_01_2013
  D:\toto\food\Cloture_856589_12_01_2013.pdf --&gt; 12_01_2013
  D:\toto\food\Cloture_66rr5254_10_12_2012.pdf --&gt; 10_12_2012
  </code></pre>
  
  <p>My idea is to use <code>LastIndexOf(".pdf")</code>  and then count 10 character backwards.</p>
  
  <p>How can I solve this using substrings or another method?</p>