<div dir="ltr">Also worth remembering that &quot;works according to the universe at the moment the RegExp was written&quot; is how we got into a lot of today&#39;s UA mess in the first place.  Just because dotless domains or some other rule is in place today, I&#39;d want to avoid encoding them into a regexp that we tell people to use since the rules may change again and I don&#39;t want to have another group following along in our wake 10 years from now trying to undo the code that we told everyone to write.<div><br><div>Jordyn</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 14, 2017 at 1:27 PM, Rubens Kuhl <span dir="ltr">&lt;<a href="mailto:rubensk@nic.br" target="_blank">rubensk@nic.br</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The BiDi issue suggests to me that even enforcing the non-dotless rule is too much for a simple regex, as shabaka.example@don is a valid Arabic EAI , while the same ASCII combination is not valid even if a .don TLD gets delegated.<br>
[non-empty]@[non-empty] looks better to me.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Rubens<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
&gt; Em 14 de set de 2017, à(s) 13:58:000, Don Hollander &lt;<a href="mailto:don.hollander@icann.org">don.hollander@icann.org</a>&gt; escreveu:<br>
&gt;<br>
&gt; Thanks Jim.<br>
&gt;<br>
&gt; The BiDi issue, with raw data input, is which side has the domain side.<br>
&gt;<br>
&gt; usually you’ll encounter mailbox@domainname.tld<br>
&gt;<br>
&gt; But in Arabic or Hebrew you’ll encounter tld.domainname@mailbox<br>
&gt;<br>
&gt; Don<br>
&gt;<br>
&gt;<br>
&gt;&gt; On 15/09/2017, at 3:44 AM, Jim Hague &lt;<a href="mailto:jim@sinodun.com">jim@sinodun.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 12/09/2017 19:44, Don Hollander wrote:<br>
&gt;&gt;&gt; One RegEx has stood out as being simple and correct.   I’d like the UASG<br>
&gt;&gt;&gt; to consider recommending this in our documentation.   Toward that end,<br>
&gt;&gt;&gt; this thread is for discussion.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; /^.+@(?:[^.]+\.)+(?:[^.]{2,})$<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Regular expression check in Javascript. This accepts any Unicode<br>
&gt;&gt;&gt; characters, only insisting that the domain must have more than one label<br>
&gt;&gt;&gt; and the TLD is 2 characters or longer.<br>
&gt;&gt;<br>
&gt;&gt; Note that this in the context of an in-browser check. I only examined a<br>
&gt;&gt; small random subset of the sites surveyed in the main evaluation, and<br>
&gt;&gt; obviously without access to server code could only examine client-side<br>
&gt;&gt; operations. In all the sites I examined, the only check performed was<br>
&gt;&gt; against one (or in one case two) regular expression(s). No decomposition<br>
&gt;&gt; of the email address was attempted, and certainly no translation of the<br>
&gt;&gt; domain to Punycode.<br>
&gt;&gt;<br>
&gt;&gt; It was in that context that I highlighted the above regex, on the basis<br>
&gt;&gt; that it&#39;s probably the only sensible option to suggest to organisations<br>
&gt;&gt; as a low-impact UA improvement (I won&#39;t say fix) at the moment. If a<br>
&gt;&gt; future evaluation exercise verifies that an existing Javascript module<br>
&gt;&gt; does the right thing, that would be a better alternative, but that would<br>
&gt;&gt; involve more substantial modifications to site code.<br>
&gt;&gt;<br>
&gt;&gt; I agree that modifying it to allow 1 character TLDs would be sensible.<br>
&gt;&gt;<br>
&gt;&gt; I also agree with the page referenced at the start of the thread (which<br>
&gt;&gt; I read before working on the report) that just checking for &#39;@&#39; is about<br>
&gt;&gt; all one should attempt, certainly client-side.<br>
&gt;&gt;<br>
&gt;&gt; Turning again to the above regex, of course, being a proposed regex for<br>
&gt;&gt; validating email addresses, it&#39;s got an obvious deficiency. It needs to<br>
&gt;&gt; add support for other label separators (e.g. open dot).<br>
&gt;&gt;<br>
&gt;&gt; Mark Svancarek raised the excellent point of bidi in the domain.<br>
&gt;&gt; Personally I&#39;m not confident I understand the bidi rules. But if the<br>
&gt;&gt; regex requires at least one label separator character in the domain and<br>
&gt;&gt; non-empty labels, will that work, given that if the regex allows 1<br>
&gt;&gt; character TLDs then a valid TLD is simply a non-empty label?<br>
&gt;&gt; --<br>
&gt;&gt; Jim Hague - <a href="mailto:jim@sinodun.com">jim@sinodun.com</a>          Never trust a computer you can&#39;t lift.<br>
&gt;<br>
&gt; Don Hollander<br>
&gt; Universal Acceptance Steering Group<br>
&gt; Skype: don_hollander<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>