Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?((([a-z0-9])*[:]){1}|(([a-z0-9])*[.]){1}|(([0-9]){1,3}([.]|[:])){3}(([0-9]){1,3}[:]){1})([a-z]{2,5}|[0-9]{1,5})([.]([a-z0-9]){1,3})?(\/.*)?$
/
g
Unit Tests
http://192.123.165.251:8080/test
→ regex does match
http://google.com/asd
→ regex does match
http://localhost:8080/test/asdasd?adasd=…
→ regex does match
http://www.domain.com.co
→ regex does match
http://www.domain.com.co:8080/callback
→ regex does not match
http://192.123.165:8080/test
→ regex does not match
http://192.123.165.251:808090/test
→ regex does not match