title: Regex to find id in url
body: <p>I have the following URL:</p>
  
  <p><a href="http://example.com/product/1/something/another-thing" rel="noreferrer">http://example.com/product/1/something/another-thing</a></p>
  
  <p>Although it can also be:</p>
  
  <p><a href="http://test.example.com/product/1/something/another-thing" rel="noreferrer">http://test.example.com/product/1/something/another-thing</a></p>
  
  <p>or</p>
  
  <p><a href="http://completelydifferentdomain.tdl/product/1/something/another-thing" rel="noreferrer">http://completelydifferentdomain.tdl/product/1/something/another-thing</a></p>
  
  <p>And I want to get the number 1 (id) from the URL using Javascript.</p>
  
  <p>The only thing that would always be the same is <code>/product</code>. But I have some other pages where there is also <code>/product</code> in the url just not at the start of the path.</p>
  
  <p>What would the regex look like?</p>