<?php $text = "11 a b 13 begin t 899 y 50 f end 91 h"; var_export(preg_match_all('~(?:begin|\G(?!^))(?:.(?!end))*?\K\d+~', $text, $out) ? $out : 'no matches');
You have javascript disabled. You will not be able to edit any code.