Example:
$string = \"This is some text written on 2010-07-18.\"; preg_match(\'|(?\\d\\d\\d\\d-\\d\\d-\\d\\d)|i\', $string, $arr_result); print_r(
It also possible to unset all numeric indexes before return:
foreach (range(0, floor(count($arr_result) / 2)) as $index) { unset($arr_result[$index]); }