Domain name/IP Regular Expression

Source: Internet
Author: User
Private   Function isvaliddo () function isvaliddo ( byval strin as string ) as Boolean
return RegEx. ismatch (strin, " ^ ([a-zA-Z0-9] ([a-zA-Z0-9 \-] {} [a-zA-Z0-9])? \.) + [A-Za-Z] {800000 }$ " )
end function

 

 
Private   Function isvalidip () Function Isvalidip ( Byval Strin As   String ) As   Boolean
Return RegEx. ismatch (strin, " ^ (2 [0-5] {2} | 2 [0-4] [0-9] | 1? [0-9] {1, 2}). (2 [0-5] {2} | 2 [0-4] [0-9] | 1? [0-9] {1, 2}). (2 [0-5] {2} | 2 [0-4] [0-9] | 1? [0-9] {1, 2}). (2 [0-5] {2} | 2 [0-4] [0-9] | 1? [0-9] {1, 2}) $ " )
End Function

 

^ ([A-zA-Z0-9] ([a-zA-Z0-9 \-] {} [a-zA-Z0-9])? \.) + [A-Za-Z] {2, 6} $Will match the domain name such as x--x.com, you will certainly think that he is illegal, in fact, the domain name can be connected with two-Number

 

Domain Name: X--X.COM
Registrar: mydomain, Inc.
whois server: whois.namesdirect.com
Referral URL: http://www.namesdirect.com
name server: ns1.mydomain. com
name server: ns2.mydomain. com
Status: OK
Updated Date: 03-Jan-2008
creation date: 31-aug-2001
expiration date: 31-aug-2009

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.