像这样…
<?PHP
$content ="<p>This is a sample text where {123456} and {7894560} ['These are samples']{145789}</p>";
preg_match_all('/{(.*?)}/', $content, $matches);
print_r(array_map('intval',$matches[1]));
Array
(
[0] => 123456
[1] => 7894560
[2] => 145789
)