<html>
<body>
// Variable to check
$email = "john(.doe)@exa//mple.com";
// Remove all illegal characters from email
$email = filter_var($email, FILTER_SANITIZE_EMAIL);
echo $email;
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_func_sanitize_email by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:14:40 GMT -->
</html>