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
Dotted-decimal IPv4 address
Open Workspace
PCRE (Legacy)
Match
Created 2013-11-15 09:18
0
Regular Expression
/
^
(?:
(?:
\d
|
[
1
-
9
]
\d
|
1
\d\d
|
2
[
0
-
4
]
\d
|
25
[
0
-
5
]
)
\.
){3}(?:
\d
|
[
1
-
9
]
\d
|
1
\d\d
|
2
[
0
-
4
]
\d
|
25
[
0
-
5
]
)
$
/
mg
Description
Validates an IPv4 address for use as a URI host as defined in RFC-3986.
Submitted by
ezzatron