$re = '/[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}/m';
$str = '4af06d20-10d5-4d9f-bfce-ca2724a82803
2a3e42b3-f3d44501-89ee-835164dcecd6f (-f3d44501-)
d7e3c311-b5b4-4c9f-a3df-a56b8512f60b
2193cf3f-8da8-4d8a-9103-c91cca66889c
80112dcf-bec8-428d-8f0-b4fd0ca506d5c (-8f0-)
{a8fbdb9f-56ac-44c9-a74f-21b393e57e57}
51b16c80-901c-4270-93a7-120a8cGb42ab ("G")
e257613b-ca10-412e-aeaf-0597db11162c
4ed178df-7575-457f-aef1-03b44b68e55H ("H")
a5E5108-5e54-4-28-b406-83a2-9a711bc4 (-4-28-)
Power Scheme GUID: 0f916538-c8d5-4144-be2a-ee82eccf6413 ';
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