$re = '/\b[A-Fa-f0-9]{64}\b/';
$str = 'MD5 ed076287532e86365e841e92bfc50d8c
SHA1 2ef7bde608ce5404e97d5f042f95f89f1c232871
SHA256 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
ssdeep3:aBn:aB
File size 12 bytes ( 12 bytes )
File type Text
Magic literalASCII text, with no line terminators
TrID Unknown!
';
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