<p>Generally I prefer to avoid adding lots of code, and gigantic regexps count as lots and lots of code!</p>
<p>Ruby has a built-in regexp for email validation, namely <code>URI::MailTo::EMAIL_REGEXP</code> which is recommended for most situations. That way, someone else can be in charge of maintaining and debugging the regexp.</p>
<p><a href="https://stackoverflow.com/questions/22993545/ruby-email-validation-with-regex" rel="nofollow">https://stackoverflow.com/questions/22993545/ruby-email-validation-with-regex</a></p>
<p>I'm not sure if that will work with the semi-colon delineated approach, but it's worth seeing if it can be made to work since I think it's much simpler, easier to read, and less to maintain.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2542?email_source=notifications&email_token=AAK2OLMEJRHACLW4WGRWO2TRDOXEFA5CNFSM4KWVLMVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMBLFHI#issuecomment-587379357">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLN7G4MZD2MINDA53A3RDOXEFANCNFSM4KWVLMVA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLOUAEMIE3DHUG73HKTRDOXEFA5CNFSM4KWVLMVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMBLFHI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2542?email_source=notifications\u0026email_token=AAK2OLMEJRHACLW4WGRWO2TRDOXEFA5CNFSM4KWVLMVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMBLFHI#issuecomment-587379357",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2542?email_source=notifications\u0026email_token=AAK2OLMEJRHACLW4WGRWO2TRDOXEFA5CNFSM4KWVLMVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMBLFHI#issuecomment-587379357",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>