function valid_email($email) { if( eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) ) { return true; } else { return false; } }
function valid_email($email) { return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) ); }
Of course, this still isn't great validation, as Rot pointed out, but this does simplify it, at least.
Never mind whether or not an address that meets the RFC acutally exists.