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
Validate local host or local network
Open Workspace
PCRE2 (PHP)
Match
Created 2023-09-04 04:23
1
Regular Expression
/
(
localhost
|
127
.
0
.
0
.
1
|
192
.
168
.
[
0
-
9
]
{1,3}
\.
[
0
-
9
]
{1,3}
)
:
?
/
gmi
Description
Validate localhost:port, 127.0.
:port, 192.168.
:port
Submitted by
Anonymous