title: How to extract substring between patterns "_" and "." in R
body: <p>I have many filenames which look like:</p>
  
  <pre><code>txt= "MA0051_IRF2.xml"
  </code></pre>
  
  <p>I want to extract <code>IRF2</code> which is between "_" and ".". How do I do this in R?</p>