<?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[1]);
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Array
(
[0] => 12345BYCKCBJTVHPKU
)