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