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
/
\b(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\b(\.\b(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\b){3}
/
gm
Unit Tests
192.168.178.1
→ regex does match
192.168.178.2
→ regex does match
200.200.200.200
→ regex does match
255.255.255.255
→ regex does match
200.200.200.200
→ regex does not match
200.200.200.200
→ regex does not match
200.200.256.200
→ regex does not match
200.200.200.200.
→ regex does not match
200.200.200
→ regex does not match
200.200.200.2d0
→ regex does not match
100.100.020.100
→ regex does not match
-1.0.0.0
→ regex does not match
2000000000000000000000000000000000000000…
→ regex does not match