$re = '/([\da-f]{2}\-){5}([\da-f]{2})/m';
$str = '7c-39-53-d8-06-97
01-00-3e-00-00-16
01-00-5e-40-d0-fb
01-00-5e-00-x0-fc
01-95-5e-7f-a-fa
ff-00-ff-ff-ff-
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php