$re = '/^\d+$\n/m';
$str = '278
00:15:13,442 --> 00:15:14,436
Mr. Burns,
279
00:15:14,454 --> 00:15:17,893
I came here because my brother
is about to be wrongfully convicted,
280
00:15:17,947 --> 00:15:19,514
and the man I\'m looking for
281
00:15:19,542 --> 00:15:21,010
would help me find the truth.
282
00:15:21,038 --> 00:15:21,907
Don\'t you get it?
283
00:15:21,932 --> 00:15:23,918
I don\'t care who you are
or what you want.
284
00:15:25,167 --> 00:15:26,801
Now get lost.
285
00:15:29,102 --> 00:15:31,170
I think you just sent away
the first person
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php