知行合一

博客园 首页 新随笔 联系 订阅 管理
 Private  Function IsCorrectEmailFormat(ByVal emailStr As StringAs 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 on 2010-02-05 19:43  callbin  阅读(225)  评论(0编辑  收藏  举报