Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?!\-)(?:(?:[a-zA-Z\d][a-zA-Z\d\-]{0,61})?[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$
/
gm
Input 1
1
New
invalid-.domains -domain.com domain--.com -domain-.-.com domain.000 .domain.net domain.net. sub.-domain.com sub.domain-.com sub-.domain.com -sub.domain.com valid.domains.below schools.k12 newTLD.clothing good.photography x.a-b.com x-y.a-b.net x-y.a-b-c.co.uk x.0ac.com schools.k12 newTLD.clothing good.photography 0-1-2.3-4.co a-----b.com
Extraction