title: Substring after a pattern
body: <p>I have a string:</p>
  
  <pre><code>str = word1.woa.1398 word2.woa.1398 word3.woa.1398 word4.woa.1398 word5.woa.1398
  </code></pre>
  
  <p>I want to extract "1398" for word3. I need the value of path to be just "1398". When I use:</p>
  
  <pre><code>path = str[/(?:word3.woa.*)[0-9]+/]
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>"word3.woa.1398 word4.woa.1398 word5.woa.1398"
  </code></pre>
  
  <p>Can someone provide me the correct regex?</p>