1 2 3 4 5 6 7
<?php $text = "blah blah Case#004552 blah blah"; sscanf(substr($text, strpos($text, 'Case#')), 'Case#%d', $numbers); var_dump($numbers);
1
int(4552)