You haven't really given the conditions to determine what exactly you want, but this should get you started:
<?php
$data_string = '2 Fast 2 Furious Tokyo Drift IMDBID!0463985.avi';
$IMDBID_pos = strpos($data_string, 'IMDBID!');
if ($IMDBID_pos !== false) {
$start_offset = $IMDBID_pos;
$avi_pos = strpos($data_string, '.avi', $start_offset);
$start_offset += 7;
if ($avi_pos !== false) {
echo 'Number: '.substr($data_string, $start_offset, $avi_pos - $start_offset);
}
}
?>