<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What is a valid email address?</title>
	<atom:link href="http://www.hm2k.com/posts/what-is-a-valid-email-address/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hm2k.com/posts/what-is-a-valid-email-address</link>
	<description>The research of an internet entrepreneur and IT consultant</description>
	<lastBuildDate>Fri, 12 Mar 2010 12:15:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-197055</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 09 Feb 2010 07:54:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-197055</guid>
		<description>&quot;I believe erratum ID 1003 is slightly wrong. RFC 2821 places a 256 character limit on the forward-path. But a path is defined as

Path = &quot;&quot;

So the forward-path will contain at least a pair of angle brackets in addition to the Mailbox. This limits the Mailbox (i.e. the email address) to 254 characters.&quot;
http://www.rfc-editor.org/errata_search.php?rfc=3696</description>
		<content:encoded><![CDATA[<p>&#8220;I believe erratum ID 1003 is slightly wrong. RFC 2821 places a 256 character limit on the forward-path. But a path is defined as</p>
<p>Path = &#8220;&#8221;</p>
<p>So the forward-path will contain at least a pair of angle brackets in addition to the Mailbox. This limits the Mailbox (i.e. the email address) to 254 characters.&#8221;<br />
<a href="http://www.rfc-editor.org/errata_search.php?rfc=3696" rel="nofollow">http://www.rfc-editor.org/errata_search.php?rfc=3696</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-196432</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 04 Feb 2010 20:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-196432</guid>
		<description>You say the regex according to RFC 2822 was over 20,000 characters long? It hasn&#039;t been optimized very well, then. I&#039;ve written a regular expression which checks the syntax according to RFC 5322; the one which obsoletes RFC 2822. It allows dot-atom, quoted-string, and obsolete local-parts, domain literals (IPv4, IPv6, and IPv4-mapped IPv6), and (internationalized) domain names. It only lacks comments and folding white spaces; the latter of which I plan to include tomorrow. Plus, it takes into account the length of each part (and the entire address), even recognizing quoted pairs as one character and the quoted string double quotes as semantically invisible.

It&#039;s 1,056 characters long. Which is quite a lot, but nothing compared to the 20,000 of which you spoke. But to make it easier, I&#039;ve made a class to allow the user to manipulate the regex at will; allowing him or her to turn off some parts (quoted string, or domain literal, for example). That way, it is useful both for those who want just a simple validator AND for those who want to allow every valid email address (except those containing comments, for the moment).

It&#039;s found at http://squiloople.com/2009/12/20/email-address-validation/ -- I hope it&#039;s helpful.

- Michael</description>
		<content:encoded><![CDATA[<p>You say the regex according to RFC 2822 was over 20,000 characters long? It hasn&#8217;t been optimized very well, then. I&#8217;ve written a regular expression which checks the syntax according to RFC 5322; the one which obsoletes RFC 2822. It allows dot-atom, quoted-string, and obsolete local-parts, domain literals (IPv4, IPv6, and IPv4-mapped IPv6), and (internationalized) domain names. It only lacks comments and folding white spaces; the latter of which I plan to include tomorrow. Plus, it takes into account the length of each part (and the entire address), even recognizing quoted pairs as one character and the quoted string double quotes as semantically invisible.</p>
<p>It&#8217;s 1,056 characters long. Which is quite a lot, but nothing compared to the 20,000 of which you spoke. But to make it easier, I&#8217;ve made a class to allow the user to manipulate the regex at will; allowing him or her to turn off some parts (quoted string, or domain literal, for example). That way, it is useful both for those who want just a simple validator AND for those who want to allow every valid email address (except those containing comments, for the moment).</p>
<p>It&#8217;s found at <a href="http://squiloople.com/2009/12/20/email-address-validation/" rel="nofollow">http://squiloople.com/2009/12/20/email-address-validation/</a> &#8212; I hope it&#8217;s helpful.</p>
<p>- Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hm2k</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-191272</link>
		<dc:creator>hm2k</dc:creator>
		<pubDate>Wed, 16 Dec 2009 13:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-191272</guid>
		<description>I created this website to demonstrate the difficulty of email address validation: http://validemail.org/</description>
		<content:encoded><![CDATA[<p>I created this website to demonstrate the difficulty of email address validation: <a href="http://validemail.org/" rel="nofollow">http://validemail.org/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hm2k</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-191126</link>
		<dc:creator>hm2k</dc:creator>
		<pubDate>Tue, 15 Dec 2009 10:26:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-191126</guid>
		<description>I have since learned that the HTML_QuickForm has package has been superseded, but is still maintained for bugs and security fixes and it&#039;s recommended to use HTML_QuickForm2 instead.

However HTML_QuickForm2 does not validate email addresses.</description>
		<content:encoded><![CDATA[<p>I have since learned that the HTML_QuickForm has package has been superseded, but is still maintained for bugs and security fixes and it&#8217;s recommended to use HTML_QuickForm2 instead.</p>
<p>However HTML_QuickForm2 does not validate email addresses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hm2k</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-190752</link>
		<dc:creator>hm2k</dc:creator>
		<pubDate>Fri, 11 Dec 2009 16:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-190752</guid>
		<description>According to sources PHP&#039;s filter_var() and FILTER_VALIDATE_EMAIL appears to use regex from the HTML_QuickForm PEAR package:

http://svn.php.net/viewvc/php/php-src/trunk/ext/filter/logical_filters.c?view=co&amp;content-type=text%2Fplain
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm/QuickForm/Rule/Email.php?view=co&amp;content-type=text%2Fplain

I still think mine provides more accurate validation for REAL email addresses.

Function provided here: http://hm2k.googlecode.com/svn/trunk/code/php/functions/validate_email.php</description>
		<content:encoded><![CDATA[<p>According to sources PHP&#8217;s filter_var() and FILTER_VALIDATE_EMAIL appears to use regex from the HTML_QuickForm PEAR package:</p>
<p><a href="http://svn.php.net/viewvc/php/php-src/trunk/ext/filter/logical_filters.c?view=co&#038;content-type=text%2Fplain" rel="nofollow">http://svn.php.net/viewvc/php/php-src/trunk/ext/filter/logical_filters.c?view=co&#038;content-type=text%2Fplain</a><br />
<a href="http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm/QuickForm/Rule/Email.php?view=co&#038;content-type=text%2Fplain" rel="nofollow">http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm/QuickForm/Rule/Email.php?view=co&#038;content-type=text%2Fplain</a></p>
<p>I still think mine provides more accurate validation for REAL email addresses.</p>
<p>Function provided here: <a href="http://hm2k.googlecode.com/svn/trunk/code/php/functions/validate_email.php" rel="nofollow">http://hm2k.googlecode.com/svn/trunk/code/php/functions/validate_email.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kawika</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-187386</link>
		<dc:creator>Kawika</dc:creator>
		<pubDate>Tue, 17 Nov 2009 16:50:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-187386</guid>
		<description>I like your real-world approach to email address validation.  I have never seen an email address with quotes or backslashes in it in the real world, and since most of the email providers I know wouldn&#039;t accept those addresses anyway, I think coding for them even if the RFCs technically allow them is unnecessary.  They are edge cases that will come up so rarely as to be negligible.  Definitely not worth trying to burden your server with a gigantic regexp.  Kudos to you for sticking to your guns, and to what is practical!</description>
		<content:encoded><![CDATA[<p>I like your real-world approach to email address validation.  I have never seen an email address with quotes or backslashes in it in the real world, and since most of the email providers I know wouldn&#8217;t accept those addresses anyway, I think coding for them even if the RFCs technically allow them is unnecessary.  They are edge cases that will come up so rarely as to be negligible.  Definitely not worth trying to burden your server with a gigantic regexp.  Kudos to you for sticking to your guns, and to what is practical!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hm2k</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-163359</link>
		<dc:creator>hm2k</dc:creator>
		<pubDate>Mon, 25 May 2009 16:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-163359</guid>
		<description>I&#039;m of the opinion that less conditions == less strict.

My point was that things like white space and comments don&#039;t need to be handled, not that they are disallowed.

A lack of handling means less conditions and thus less strict.

Whereas disallowing them would imply conditions, restrictions, thus being strict.

I think you misinterpreted the point I was making.</description>
		<content:encoded><![CDATA[<p>I&#8217;m of the opinion that less conditions == less strict.</p>
<p>My point was that things like white space and comments don&#8217;t need to be handled, not that they are disallowed.</p>
<p>A lack of handling means less conditions and thus less strict.</p>
<p>Whereas disallowing them would imply conditions, restrictions, thus being strict.</p>
<p>I think you misinterpreted the point I was making.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flostre</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-163338</link>
		<dc:creator>flostre</dc:creator>
		<pubDate>Mon, 25 May 2009 15:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-163338</guid>
		<description>&gt; Look around, email addresses in the real world aren’t so strict and are far more loosely defined.

&gt;    * No folding white space (FWS) - I’ve never seen a multi-line email address field for a single address.
&gt;    * No comments (CFWS) - Comments simply do not belong in an email address, they can go else where.
&gt;    * No quotes - When was the last time you saw quoted text in an email address?
&gt;    * No IP addresses, domains only - They are only used in temporary circumstances, not live.
&gt;    * No new lines - they could result in “email header injection”.
&gt;    * Reasonable lengths - both parts, and the whole thing needs to be kept to a reasonable maximum length.

If you disallow things that are allowed in the RFC that makes your definition more strict, not less. (stricter=fewer things allowed)</description>
		<content:encoded><![CDATA[<p>&gt; Look around, email addresses in the real world aren’t so strict and are far more loosely defined.</p>
<p>&gt;    * No folding white space (FWS) &#8211; I’ve never seen a multi-line email address field for a single address.<br />
&gt;    * No comments (CFWS) &#8211; Comments simply do not belong in an email address, they can go else where.<br />
&gt;    * No quotes &#8211; When was the last time you saw quoted text in an email address?<br />
&gt;    * No IP addresses, domains only &#8211; They are only used in temporary circumstances, not live.<br />
&gt;    * No new lines &#8211; they could result in “email header injection”.<br />
&gt;    * Reasonable lengths &#8211; both parts, and the whole thing needs to be kept to a reasonable maximum length.</p>
<p>If you disallow things that are allowed in the RFC that makes your definition more strict, not less. (stricter=fewer things allowed)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP Email Validator &#124; Isusx's Programming Corner</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-126653</link>
		<dc:creator>PHP Email Validator &#124; Isusx's Programming Corner</dc:creator>
		<pubDate>Wed, 10 Dec 2008 17:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-126653</guid>
		<description>[...] Links About Email Address PHP What is a Valid Email Address? PHP:Checkdnsrr function manual   Share and [...]</description>
		<content:encoded><![CDATA[<p>[...] Links About Email Address PHP What is a Valid Email Address? PHP:Checkdnsrr function manual   Share and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hm2k</title>
		<link>http://www.hm2k.com/posts/what-is-a-valid-email-address/comment-page-1#comment-105976</link>
		<dc:creator>hm2k</dc:creator>
		<pubDate>Thu, 02 Oct 2008 12:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.hm2k.com/?p=205#comment-105976</guid>
		<description>Yes, there&#039;s testing a regex, then there&#039;s testing it against real life.

The reality is that ’.’ IS allowed just before &#039;@&#039;;
You will find that using quotes in an email address will simply be rejected by the mail server;
As for the double dot in the domain, that&#039;s a separate issue that shouldn&#039;t really be handled by this regex.

I use mailinator.com and my own setup to do test cases. This tells me if the email address is valid or not as the RFC specification is not reliable enough.

Domain names can be checked using validation, you only need a basic check.

Look at the length of the regex i&#039;ve provided, and the regex provided by regular-expressions.info, the length is ridiculous for such a simple task.

Remember, regex along CANNOT define a valid email address, there is no &quot;ultimate&quot; regex, you need to use other systems for validation.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Yes, there&#8217;s testing a regex, then there&#8217;s testing it against real life.</p>
<p>The reality is that ’.’ IS allowed just before &#8216;@&#8217;;<br />
You will find that using quotes in an email address will simply be rejected by the mail server;<br />
As for the double dot in the domain, that&#8217;s a separate issue that shouldn&#8217;t really be handled by this regex.</p>
<p>I use mailinator.com and my own setup to do test cases. This tells me if the email address is valid or not as the RFC specification is not reliable enough.</p>
<p>Domain names can be checked using validation, you only need a basic check.</p>
<p>Look at the length of the regex i&#8217;ve provided, and the regex provided by regular-expressions.info, the length is ridiculous for such a simple task.</p>
<p>Remember, regex along CANNOT define a valid email address, there is no &#8220;ultimate&#8221; regex, you need to use other systems for validation.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
