<?php
$str = '<!--BODY-->Thank you for enrolling for Invoice Gateway with Harry Cooper Supply Company<br />
<br />
To activate your Invoice Gateway account, please click the below link.<br />
<br />
If you cannot click this link, you should copy and paste this entire link
into your browser or AOL address box and press enter.<br />
<br />
https://secure.billtrust.local/harrycooper/ig/signup/activate?t=12345BYCKCBJTVHPKU<!--ENDBODY-->';
$regex = "~t=(.*?)<!--ENDBODY-->~";
$output = preg_match_all($regex, $str, $matches);
print_r($matches);