public static function text2mailto($data) { $email = '/('; $email .= Sitengine_Regex::getMailbox(); $email .= Sitengine_Regex::getServerName(); $email .= ')/'; return preg_replace($email, '<a href="mailto:\\1">\\1</a>', $data); }
public static function emailAddress($val) { $p = '/^'; $p .= Sitengine_Regex::getMailbox(); # mailbox portion $p .= Sitengine_Regex::getServerName(); $p .= '$/'; return preg_match($p, $val); }