以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  输入格式问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=71344)

--  作者:lswwsl
--  发布时间:2015/7/9 16:43:00
--  输入格式问题
怎么限制 Textbox中输入的必须是邮箱格式?
--  作者:大红袍
--  发布时间:2015/7/9 16:50:00
--  

Validating事件

 

Dim reg As new System.Text.RegularExpressions.Regex("^[a-z0-9]+([._\\\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$")
If reg.IsMatch(e.Sender.Text) = False Then
    msgbox("格式不符合")
    e.Cancel = True
End If