" // that needs more percent encoding to be done if ($string == '') { return false; } $string = trim ( $string ); $result = preg_match ( '/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $string ); return $result ? $string : false; } } // vim: et sw=4 sts=4