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
Port validator
Open Workspace
Python
Match
Created 2016-04-19 10:13
2
Regular Expression
r"
^
(?P<port>
[
1
-
9
]
{1,4}
|
[
1
-
5
]
[
\d
]
{1,4}
|
6
[
0
-
5
]
{2}
[
0
-
3
]
[
0
-
5
]
)
$
"
mg
Description
Validates port numbers from 1 to 65535
Submitted by
Agustín Bouillet