title: Split a string by '_'
body: <p>I have a number of files in a directory with the following file format:</p>
  <pre><code>roll_#_oe_yyyy-mm-dd.csv
  </code></pre>
  <p>where <code>#</code> is a integer and <code>yyyy-mm-dd</code> is a date (for example roll_6_oe_2008-02-12).</p>
  <p>I am trying to use the split function so I can return the number on its own. So for example:</p>
  <p>roll_6_oe_2008-02-12 would yield 6<br />
  and<br />
  roll_14_oe_2008-02-12 would yield 14</p>
  <p>I have tried :</p>
  <pre><code>filename.split(&quot;_&quot;)
  </code></pre>
  <p>but cannot write the number to a variable. What can I try next?</p>