On Thu, 19 Mar 2020 14:15:09 +0000, Theo wrote:
> A. Dumas wrote:
>> More or less impossible. E.g. apparently you didn't think that + is a
>> valid character, which it is (in the part before the @). Also, domains
>> (and usernames) can be UTF8. Best way is: try to deliver, check reply.
>
> It's extremely hard, but some people have tried:
>
> https://emailregex.com/
> https://stackoverflow.com/questions/201323/how-to-validate-an-email-
address-using-a-regular-expression
>
> Definitely not a thing to make up yourself, you'll almost certainly get
> it wrong.
>
Yep, so it seems - and anyway the examples on your second link are very
unlikely to be accepted by recomp(), so I'll have a play with Java's
pattern matching classes. IIRC they sidestep the UTF8 problem anyway.
Thanks for that.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|