Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
IP Address (with 0s)
Open Workspace
JavaScript
Match
Created 2015-09-28 21:24
10
Regular Expression
/
^
(
(
1
?
[
\d
]
?
[
\d
]
|
2
(
[
0
-
4
]
[
\d
]
|
5
[
0
-
5
]
)
)
[
.
]
){3}(
1
?
[
\d
]
?
[
\d
]
|
2
(
[
0
-
4
]
[
\d
]
|
5
[
0
-
5
]
)
)
$
/
Description
Matches all valid IP addresses from 0.0.0.0 to 255.255.255.255
Submitted by
Ryan Plummer