If you need just number, something like this?
$page2='<td><span class="bookdetailtitle">ISBN</span></td>
<td>:</td>
<td>9788172338299</td>';
preg_match('/<td>+[0-9]+<\/td>/', $page2, $keywords);
print_r($keywords);
http://phpfiddle.org/main/code/43j-t8b
P.S. many will say - don't use regex for parsing html. I agree. :)
I would do something like this:
$page=explode('<td>',$page2);
print_r($page[3]);
http://phpfiddle.org/main/code/buf-95c
Edit: to get rid of last td -> print_r(strip_tags($page[3]));