$re = '/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/m';
$str = '11-D6-D4-D7-B0-80
B5-42-A1-A7-33-B1
8C-03-74-2B-C6-D1
B5-5E-20-CH-1D-E6
7F-83-86-B6-7A-93
31-CE-78-13-75-FF
E5-EF-62-80-46-BC
D8-G2-44-10-49-E8
C6-45-E2-C5-D8-B3
F2-CA-6C-77-C3-7D
05-A0-4F-8A-F9-71
82-7B-DZ-D5-06-DA
B8-9F-45-90-D9-B3
82-7B-D6-D5-06-DA
';
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