Determine whether it is the correct URL
Function IsValidUrl(str) Dim regEx Set regEx = New RegExp = "http(s)?://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?" IsValidUrl = (str) End Function
ASP regular expression parses out the domain name part in the URL
Function getDomain(domain) Dim re,ReturnStr,Matches Set re=new RegExp =True =True = "(\w+\.(||com|cn|net|org))" Set Matches = (domain) ReturnStr = "" For Each Match in Matches ReturnStr = Exit for Next getDomain = ReturnStr Set re=Nothing End Function getDomain("///")
This is the introduction to this article about the regular article on asp matching URLs. For more related asp matching URL content, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!