این کد به شما نشون آدرس ایمیلی را که کاربر وارد کرده، معتبر است یا خیر؟
مثلا" example@dom@main.com یه آدرس غیر معتبره.
کد:Imports System.Text.RegularExpressionsنویسنده ی کد: Muhammed Mohiudeen.M.Nکد:Dim emailAddress As String = InputBox("Plz enter ur Email Address:") Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern) If emailAddressMatch.Success Then MsgBox("Correct Email Address.", 64) Else MsgBox("Invalid Email Address.", 48) End If






پاسخ با نقل قول
Bookmarks