$re = '/^[0-9A-F]{32}$/im';
$str = 'fab4cc07260bc73302a2653aa2b0e6de
46cc38cc1039848dc287162cc4cf2532
a065c2cf24295a13725af9c5dc8cc76c
87d0f33c047915a0000ca972f3b32adc
43da9d5db71bedf3afc6f10fc8297a00
3fcca411d6774571a81a9faa4026c69a
9f36002354b2b75a069facac88ce5651
064ec24407084bf597c7dc1edc3f9017
3f5cfb400d72c7b3663b617368a0b3af';
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