How to get the last digits that are numbered before '.html' string


there is a string, for example :

i could not get 1111 in anyway with regexp in php. Is it possible? How?

my code:

$address = '';


If the url example is how they will always appear (ie. ending in hyphen, numbers, .html) then this should work:

$str = "";

preg_match('#.*-(\d+)\.html#', $str, $matches);

If they won't always match the pattern you gave in your question, then clarify by showing alternative values for your $address value.