[Import] [original] Primary Domain Name of level 2 or multi-level domain name for regular analysis

Source: Internet
Author: User

Most domain names are correct (domain names in small countries are not listed. You need to add them to the domain name-Wikipedia query)

The regular expression is:
([A-z0-9] [a-z0-9 \-] *? \.(? : Com | cn | net | org | gov | info | la | cc | co )(? :\.(? : Cn | jp ))?) $

Matching result:

Http://jorkin.reallydo.com
Http://www.howq.net
Http://bbs.eventsmap.com.cn
Http://mp3.sogou.com
Http://www.51.la
Http://www.yahoo.co.jp
Http://6.cn
Http://hi.baidu.com

If you have any domain names that cannot be matched, please reply later.

Second-level domain name Regular Expression Analysis

In this way, you can scan the page and add a small icon behind the outer link.

$ (Document). ready (function (){
Var sHostname = location. hostname;
SDomain = sHostname. replace (/(.*?) ([A-z0-9] [a-z0-9 \-] *? \.(? : Com | cn | net | org | gov | info | la | cc | co )(? :\.(? : Cn | jp ))?) $/, "$2"). toLowerCase ();
$ ('A: not (: has (img) '). filter (function (){
Var sLinkHostname = this. hostname;
SLinkDomain = sLinkHostname. replace (/(.*?) ([A-z0-9] [a-z0-9 \-] *? \.(? : Com | cn | net | org | gov | info | la | cc | co )(? :\.(? : Cn | jp ))?) $/, "$2"). toLowerCase ();
Return sLinkDomain! = SDomain & sLinkDomain! = '';
}). After (' ');
})

Source: http://Jorkin.Reallydo.Com/default.asp? Id = 567

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.