RegEx - 两者之间的数字。 和/ /

I have a bunch of URL's like this. I need to get the thread id which is located between "." and "/" without getting the post number on the end of the URL.

https://www.internetforum.com/thread-title-here.111111/#post-22222222

I'd like regex to get 111111 in this example.

Can anyone help? I can't do this for the life of, I've got no issues with getting digits between two strings but I'm struggling as it's symbols here and not characters...

Thanks in advance.

Could do something like so,

$str = 'https://www.internetforum.com/thread-title-here.111111/#post-22222222';
preg_match('/internetforum.com\/.*?\.(.*?)\/.*/',$str,$matches);
echo $matches[1];

You can use the following code:

<?php

    $url = "https://www.internetforum.com/thread-title-here.111111/#post-22222222";

    preg_match("/\.([0-9]+)\//", $url, $match);

    if($match){
        echo $match[1]; // prints out 111111
    }


    ?>

Try without regex for example:

$s = 'https://www.internetforum.com/thread-title-here.111111/#post-22222222';
echo $o = explode("/",end(explode(".", $s)))[0];