line 146
define("LINK_TEXT", "#/>(.?)</a#i");
should be
define("LINK_TEXT", "#>(.?)</a#i");
Text that successfully matches MAILTO_EMAIL '#(<a[^<>]?href=[\'\"]mailto:[^<>]?>.?)#i' will not then match LINK_TEXT "#/>(.?)</a#i" because of an extraneous forward slash (maybe left over from changing the regex delimiter?)
line 149
$tmatches = preg_match(LINK_TEXT, $text, $tmatches); //array();
should be
preg_match(LINK_TEXT, $text, $tmatches);
The preg_match function will fill the 3rd parameter with the results of search which is what we want, but assigning the return value of the function to $tmatches as well overwrites this with 0 or 1.
line 146 define("LINK_TEXT", "#/>(.?)</a#i"); should be define("LINK_TEXT", "#>(.?)</a#i");
Text that successfully matches MAILTO_EMAIL '#(<a[^<>]?href=[\'\"]mailto:[^<>]?>.?)#i' will not then match LINK_TEXT "#/>(.?)</a#i" because of an extraneous forward slash (maybe left over from changing the regex delimiter?)
line 149 $tmatches = preg_match(LINK_TEXT, $text, $tmatches); //array(); should be preg_match(LINK_TEXT, $text, $tmatches);
The preg_match function will fill the 3rd parameter with the results of search which is what we want, but assigning the return value of the function to $tmatches as well overwrites this with 0 or 1.
fixes #4