[UA-discuss] Regular Expression To Validate EAI Addresses

Marc Blanchet marc.blanchet at viagenie.ca
Fri Aug 14 17:33:02 UTC 2020


On 14 Aug 2020, at 13:19, Abdalmonem Tharwat Galila wrote:

> Marc, I doubt that engines can not understand this !!

you are top posting, so I’m not sure you are referring to what. I’m 
guessing that you are referring to my comment on « not all regex 
engines support Unicode properties ». I don’t have any data of all 
regex engines, but I’ve encountered in the past regex engines not 
supporting Unicode properties. Sometimes it is some extension, some 
flags to enable the use of these. Sometimes it is a different syntax (I 
think the POSIX one uses :className: format for example, and I don’t 
know how it maps to unicode). How many, which, well, that is something 
to figure out. It may be less of an issue nowadays, don’t know. My 
point is just make sure your regex engine support those. Experience has 
shown various degree of support of regex format enhancements of 
different regex engines.

Marc.

> Specially that it is working for Arabic and also test for Russian 
> guys.
>
> If you have names of this engines, we have to contact them to support 
> that, or what do you think !!
>
> Sent from my iPhone
>
>> On Aug 14, 2020, at 6:57 PM, Marc Blanchet 
>> <marc.blanchet at viagenie.ca> wrote:
>>
>> On 14 Aug 2020, at 11:32, Abdelmeniem Tharwat wrote:
>>
>>> Dear colleagues,
>>>                I hope that you are doing well, since along time I 
>>> tried to use regex to validate EAI addresses for many project I have 
>>> related to UA, I used the tool here<https://rubular.com/> and used 
>>> this
>>> Regex "^[\p{L}.%+-]+@[\p{L}.-]+\.[\p{L}]{2,}$" to validate some EAI 
>>> addresses and it works well like the below screenshot.
>>
>> {L} is for Unicode property Letter. So:
>> - for IDNA, it is near (as IDNA base is Unicode Letter property) but 
>> not quite. see RFC5892
>> - for EAI, then it is restricting a lot since the mailbox can be 
>> almost any UTF8 string. see RFC6531
>>
>> So you may want to use that regex, but be aware of its side-effects, 
>> including not accepting some domains and mailboxes.
>>
>> Finally, not all regex engines support Unicode properties, so make 
>> sure the one used support it.
>>
>> Regards, Marc.
>>
>>>
>>> [cid:image010.png at 01D67260.F5721690]
>>>
>>>
>>> Thanks a lot.
>>>
>>> All the Best,
>>> Abdalmonem Tharwat Galila
>>> Deputy Manager, Dot Masr Registry,
>>> Operation Sector.
>>>
>>> [NTRA Logo 2016]
>>> National Telecommunication Regulatory Authority
>>> [Description: Description: Description: Description: Description: 
>>> Description: Description: Description: Description: Description: 
>>> 1365523405_telephone]   Office Tel.: +2 02 
>>> 35341582<tel:02%2035341582> - +2 02 35341300<tel:02%2035341300>
>>> [Description: Description: Description: Description: Description: 
>>> Description: Description: Description: Description: Description: 
>>> Mobile]    Mobile:  +2 010 00049068<tel:010%2000049068>
>>> [Description: Description: Description: Description: Description: 
>>> Description: Description: Description: Description: Description: 
>>> ICON]   Fax       :  +2 02 35370537<tel:02%2035370537>
>>> [Description: Description: Description: Description: Description: 
>>> Description: Description: Description: Description: Description: 
>>> oNLINE]  Website : http:\\www.mcit.gov.eg<http://www.mcit.gov.eg/>
>>>                        : 
>>> http:\\www.tra.gov.eg<http://www.mcit.gov.eg/>
>>> [Description: Description: Description: Description: Description: 
>>> Description: Description: Description: Description: Description: 
>>> 1365523294_email]   E-mail     : 
>>> agalila at mcit.gov.eg<mailto:agalila at mcit.gov.eg>
>>>                        : 
>>> atharwat at tra.gov.eg<mailto:atharwat at tra.gov.eg>
>>> [Description: 1447802547_skype]  Skype      : abdalmonem.galila
>>> [Description: static_qr_code_without_logo]
>>> [Description: Description: Description: Description: Description: 
>>> Description: Description: Description: Description: Description: 
>>> 1365523469_error]DISCLAIMER
>>>          This e-mail and any files transmitted with it are 
>>> confidential and intended solely for the use of the individual or  
>>> entity to which they are addressed. If you have received this email 
>>> in error please notify your system support manager. Please note that 
>>> any views or opinions presented in this email are solely those of 
>>> the author and do not necessarily represent those of the National 
>>> Telecom Regulatory Authority (NTRA) .  Finally, the recipient should 
>>> check this email and any attachments for the presence of viruses. 
>>> The NTRA accepts no liability for any damage caused by any virus 
>>> transmitted by this email.
>>
>>
>>> _______________________________________________
>>> UA-discuss mailing list
>>> UA-discuss at icann.org
>>> https://mm.icann.org/mailman/listinfo/ua-discuss
>>> _______________________________________________
>>> By submitting your personal data, you consent to the processing of 
>>> your personal data for purposes of subscribing to this mailing list 
>>> accordance with the ICANN Privacy Policy 
>>> (https://www.icann.org/privacy/policy) and the website Terms of 
>>> Service (https://www.icann.org/privacy/tos). You can visit the 
>>> Mailman link above to change your membership status or 
>>> configuration, including unsubscribing, setting digest-style 
>>> delivery or disabling delivery altogether (e.g., for a vacation), 
>>> and so on.


More information about the UA-discuss mailing list