title: Extract string between nth occurrence of character and another character
body: <pre><code>filelist &lt;- c(
    "http://content.caiso.com/green/renewrpt/20171015_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171016_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171017_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171018_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171019_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171020_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171021_DailyRenewablesWatch.txt",
    "http://content.caiso.com/green/renewrpt/20171022_DailyRenewablesWatch.txt"
  )
  </code></pre>
  
  <p>I am looking to extract the string between the 5th occurrence of <code>/</code> and <code>_</code>
  <p>
  Ex: From                                     <code>"http://content.caiso.com/green/renewrpt/20171015_DailyRenewablesWatch.txt"</code>
  I would want <code>20171015</code>.
  I have tried </p>
  
  <pre><code>regmatches(filelist, regexpr("/{4}([^_]+)", filelist))
  </code></pre>
  
  <p>but it returns empty.</p>