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 :)
Theo
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|