網址url 正規表示式
"(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?"
Public Shared Function RegURL(ByVal strParam As String) As Boolean
Dim r As Regex = New Regex("(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?")
Dim m As Match = r.Match(strParam)
If m.Success And m.Length = Len(strParam) Then
Return True
Else
Return False
End If
End Function
留言
張貼留言