3v4l.org

run code in 300+ PHP versions simultaneously
<?php $part = "+61-426 861 479"; preg_match_all('/\+(\d{2})-(\d{3}(?: \d{3}){2})\b/', $part, $matches, PREG_SET_ORDER, 0); print_r($matches); echo $matches[0][1] . " " . $matches[0][2];

preferences:
102.54 ms | 1635 KiB | 5 Q