If I have understood your question correctly, then the following regex should work for you (note, Regex and HTML are not friends, but you can use this instead of an HTML parser, if it's not more complicated than this).
A regex of #<img.*src.*/files/thumb/([0-9]+)/([0-9]+).*>#
should work:
<?php
$string = '<img width="526" height="339" style="float: none;" src="http://www.test.com/files/thumb/91/595" class="pyro-image" alt="floyd mayweather">';
preg_match('#<img.*src.*/files/thumb/([0-9]+)/([0-9]+).*>#', $string, $matches);
echo "Image ID: " . $matches[1] . "<br />";
echo "Other number: " . $matches[2] . "<br />";
?>
Outputs
Image ID: 91
Other number: 595