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
Open Workspace
PCRE2 (PHP)
Match
Created 2026-03-01 02:22
1
Regular Expression
/
(?(DEFINE)
(?'n'
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
1
[
0
-
9
]
[
0
-
9
]
|
[
1
-
9
]
[
0
-
9
]
|
[
0
-
9
]
)
)
(?P>n)
\.
(?P>n)
\.
(?P>n)
\.
(?P>n)
/
gm
Description
Matches and verifies IP address. 192.168.0.1 Matches 999.999.9.9 Didn't match
Submitted by
Anonymous