TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: THEO
from: MARTIN GREGORIE
date: 2020-03-20 13:20:00
subject: Re: Regexes and C

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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.