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
/
^(?:https:\/\/)?(?:(?!-))(?:xn--)?[a-z0-9][a-z0-9-_]{0,255}[a-z0-9]{0,1}\.?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(?:xn--)?(?:[a-z0-9\-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$
/
gm
Unit Tests
There are no unit tests, click
here
to add some.