[UA-discuss] Regular Expression To Validate EAI Addresses

John Levine john.levine at standcore.com
Fri Aug 14 16:15:26 UTC 2020


In article <A1234DFB-AE2B-4FA4-9FB7-B65D365651BD at viagenie.ca> you write:
>The best way would be to modify the regex engine itself to embed the 
>IDNA protocol inside it and then define a new regex token for IDNA and 
>then we will be in business… Not an easy task.

Good catch on the digits, I missed that. To validate host names I
think the least bad plan is not to try to build IDNA into regexes, but
do it in two steps, use a loose RE but then validate the domain
through an actual IDN library.

-- 
Regards,
John Levine, johnl at taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly


More information about the UA-discuss mailing list