I have the following URL:

<http://example.com/product/1/something/another-thing>

Although it can also be:

<http://test.example.com/product/1/something/another-thing>

or

<http://completelydifferentdomain.tdl/product/1/something/another-thing>

And I want to get the number 1 (id) from the URL using Javascript.

The only thing that would always be the same is `/product`. But I have some other pages where there is also `/product` in the url just not at the start of the path.

What would the regex look like?