- print_r: documentation ( source)
- preg_match_all: documentation ( source)
- preg_replace: documentation ( source)
- array_walk: documentation ( source)
<?php
$text = <<<EOD
PRD Hervey Bay 07 2525 1919
RG Sprake & Co Maryborough 4141 2424
Owner Robert - 0429 966 391
Owner Maureen - 07 8888 4444 - 0422000 111
Owner Wayne - 0430 555 666
Builder Scott - 0444 555 777
EOD;
preg_match_all('/^(Owner |Builder )?(.*?)(?=-| \d)[- ]+(.*)$/m', $text, $matches);
array_walk($matches[3], function (&$v) { $v = preg_replace('/[^\d]/', '', $v); });
print_r($matches);