''' <summary>
        ''' 判斷是否為整確的mail格式
        ''' </summary>
        ''' <param name="strMail">E-Mail</param>
        Public Shared Function IsEmail(ByVal strMail As String) As Boolean
            Dim strAddMail() As String = strMail.Split(";")
            For i As Integer = 0 To strAddMail.Length - 1
                Dim strRegex As String = "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.){1,4}[a-z]{2,3}$"
                Dim re As New Regex(strRegex)
                If Not re.IsMatch(strAddMail(i)) Then
                    Return False
                End If
            Next

            Return True
        End Function

創作者介紹

歡迎~ 程式設計 學生 作業 專題製作 程式外包 家教...

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()