Please edit the link as <i>Validating Email Addresses The Wrong Way</i><p>The right way is<p><pre><code> filter_var('bob@example.com', FILTER_VALIDATE_EMAIL);
</code></pre>
Same for validating the domain.
And also : <a href="http://news.ycombinator.com/item?id=4486108" rel="nofollow">http://news.ycombinator.com/item?id=4486108</a>