正则表达式——多邮箱地址检测 (Regular Expression - Mutil E-mail Checking)

E-mail Format Checking [VB.net]

   Private Function IsCorrectEmailFormat(ByVal emailStr As String) As Boolean

       'Dim reg As New System.text.RegularExpressions.Regex("^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$")               '-- This is the Single E-mail handling    
    Dim reg As New System.text.RegularExpressions.Regex("^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+(;)*(( )*(;)+( )*[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+(;)*)*$"
'-- This is Mutil-E-mail handling, split by ";".
       Return reg.IsMatch(emailStr)

   End Function 


posted @ 2008-07-14 23:12  瀚瀚  阅读(874)  评论(1编辑  收藏  举报