title: Regex help, subset based on nth occurance from the end of string
body: <p>An example vector:</p>
  <pre><code>string &lt;- &quot;Junk1_Junk2_Junk3__ID1_Junk4_Junk5.pdf&quot;
  </code></pre>
  <p>I am trying to subset <code>ID1</code> by counting <code>_</code> (underscores) from the right; so subset between the second and 3rd underscore from the right.</p>
  <p>expected output: <code>ID1</code></p>
  <p>My attempt was to try to use the double <code>__</code>,
  but this is not going to work, because not all my string list has it.</p>
  <p>Attempt: <code>(_){2}([^_]+)</code></p>
  <p>Side note, I am trying to get comfortable with regex; please recommend a resource to build and test.</p>
  <p>Any assistance is appreciated.</p>