Possible duplicate:What is the best regular expression for checking email addresses?
I am using a form that requests an email address. I used regex for it as
.*@.*\..*
But it does not work fine for my test email id, e.g.
dsrasdf @@@ fer@hbdf.vjif
Any of them provides me with a regular expression for checking email in asp.net or I can use some other method for this.
Please give your suggestions.
.
try { address = new MailAddress(address).Address; } catch(FormatException) { //address is invalid }
( ):
^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$
asp, , .
^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z{2-4}|[0-9]{1,3})(\]?)$
Source: https://habr.com/ru/post/1763580/More articles:Form not submitted after second call - javascriptВычитайте изображения с помощью opencv - c++Combining MVVM, ORM and some hardware interfaces - c #Доступ к учетным записям Gmail из С# - c#how to read email from gmail using c # - c #Dynamically creating jQuery Datepicker using altFields - jqueryTSQL Поиск строк в другой таблице - sql-server-2005Select text in PDF file (iphone) - iphoneAndroid: Optionsmenu 'More-list' with icons - androidЗапрос запросов к MySQL и подсчет голосов - joinAll Articles