<?php$start = microtime(true);$string = "00787817878110d0a22278780d0a78783330d0a00";preg_match_all('/7878.*?0d0a(?=7878|[^(7878)]*?$)/', $string, $arr);$end = microtime(true);print_r($arr);echo "Time: ".($end - $start); ?>
Standard input is empty
Array ( [0] => Array ( [0] => 787817878110d0a22278780d0a [1] => 78783330d0a ) ) Time: 0.00011396408081055
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!