- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$body = 'List-Unsubscribe: <http://a.mydomain.com/u/1/100/23/f0fd224f822a5af1498fa326d201c8c4/>';
$getCampListEmailid =preg_match("/^List-Unsubscribe: <http:\/\/a.mydomain.com\/u\/([0-9]+)[\/]([0-9]+)[\/]([0-9]+)[\/][a-f0-9]{32}[\/>]/",$body,$match);
var_dump($getCampListEmailid);
var_dump($match[1]);
var_dump($match[2]);
if($getCampListEmailid && isset($match[1]) && isset($match[2])){
print 'yep';
}