Shared
Function
isright(
ByRef
s
As
String
,
ByRef
right
As
String
)
As
Boolean
Dim Regex As New Regex( right , RegexOptions.IgnoreCase)
Return Regex.IsMatch(s)
End Function
Dim Regex As New Regex( right , RegexOptions.IgnoreCase)
Return Regex.IsMatch(s)
End Function
原来我写的太垃圾了,修正一下
使用示例:
if
isright(useremail,
"
^w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*$
"
)
then
exit sub
文章来源: http://blog.csdn.net/chsword/archive/2006/12/25/1460308.aspx