Click here to Skip to main content
15,881,757 members

Comments by Akshat J (Top 2 by date)

Akshat J 13-Sep-22 0:12am View    
Deleted
I am not sure if this code worked for you or not. But the validation regex that was used:
@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
@"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
@".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
has serious flaws when we see it in 2022 when protocols have changed and adoption of IDNs and Internationalized Email IDs is widespread.
The letters that can constitute email local part and the domain names have expanded far beyond the a-z,A-Z and 0-9.
Akshat J 12-Sep-22 8:33am View    
Deleted
Apoorva, though you seem to have found out a solution, be cognizant of the fact that you are simplistically assuming that the email IDs comprise only of a-z,A-Z and 0-9 and "_" (underscore) in the local part, a-z,A-Z and 0-9 in second level domain part and a-z,A-Z in the Top level domain part. They potentially can contain huge number of additional characters which are able to represent letters in different scripts of the world.