On Fri, 20 Mar 2020 11:44:30 +0000, Theo wrote:
> Martin Gregorie wrote:
>> I spent more time than I should have yesterday trying to understand
>> regcomp(), regexec() and regerror() well enough to validate a string
>> containing an e-mail address string to make sure that: its structure is
>> correct and neither the username nor the domain contains characters
>> they shouldn't.
>
> For all of you trying to do this in regexes, I present some test cases:
>
> 用户@例子.广告 (Chinese, Unicode)
अजय@डाटा.भारत
> (Hindi, Unicode) квіточка@пошта.укр (Ukrainian,
Unicode)
> θσερ@εχαμπλε.ψομ (Greek, Unicode)
Dörte@Sörensen.example.com
> (German, Unicode) коля@пример.рф (Russian, Unicode)
>
> courtesy of:
> https://en.wikipedia.org/wiki/International_email
>
> I hope your code handles them appropriately :)
>
This appears to describe just the display-name. From RFC 5322 it seems
that the address can only use ASCII characters, and at this point I'm
only dealing with the address.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|