Site Tools


domain

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
domain [2015/05/26 17:34]
conovaloff
domain [2015/06/11 19:19] (current)
conovaloff
Line 1: Line 1:
-http://​www.regexr.com/​3b2tq+http://​www.regexr.com/​3b6e7
 <​code>​ <​code>​
-^([a-z0-9_][a-z0-9-_]{0,​61}[a-z0-9_]\.)*([a-z0-9][a-z0-9-]{0,​61}[a-z0-9]\.)([a-z0-9][a-z0-9-]{0,​61}[a-z0-9])$ +^((?​!-)[a-z0-9-_]{0,​61}[a-z0-9]\.)+((?​!-)[a-z0-9][a-z0-9-]{0,​61}[a-z0-9])$
-and if need catch groups: +
-^((?:(?!-)[a-z0-9][a-z0-9-_]{0,​61}[a-z0-9]\.)*(?​!-)[a-z0-9][a-z0-9-_]{0,​61}[a-z0-9])\.((?​!-)[a-z0-9][a-z0-9-_]{0,​61}[a-z0-9])$ +
  
 Good domains: Good domains:
 +example.com
 summer.time.hello.myfriend.com summer.time.hello.myfriend.com
 xn-fsqu00a.xn-0zwm56d xn-fsqu00a.xn-0zwm56d
Line 14: Line 12:
 google.com.au google.com.au
 xn--e1ajeds9e.xn--p1ai xn--e1ajeds9e.xn--p1ai
 +s.google.com.au
 +_asdasd.google.com.au
  
 timg.ws timg.ws
Line 19: Line 19:
  
 Bad domains: Bad domains:
 +_.google.com.au
 +sdfgsd._.google.com.au
 -stackoverflow.xn--com -stackoverflow.xn--com
 stackoverflow.--xn--com stackoverflow.--xn--com
 stackoverflow..co.uk stackoverflow..co.uk
 +../​example.com
 +/​example.com
 +
 +
  
 Domain validator by Tim! Domain validator by Tim!
 Edited by ConConovaloff. Edited by ConConovaloff.
-</​code>​ 
  
 http://​stackoverflow.com/​questions/​10306690/​domain-name-validation-with-regex/​26987741#​26987741 http://​stackoverflow.com/​questions/​10306690/​domain-name-validation-with-regex/​26987741#​26987741
 +</​code>​
  
 === Подчеркивание === === Подчеркивание ===
 В регистрируемом домене и зоне - нельзя \\ В регистрируемом домене и зоне - нельзя \\
 В поддоменах - можно (для примера dkim: mail._domainkey.conovaloff.com) В поддоменах - можно (для примера dkim: mail._domainkey.conovaloff.com)
domain.txt · Last modified: 2015/06/11 19:19 by conovaloff

Page Tools