lechihuy

IP v4 address Regex

Regex
/^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])){3}$/gm
Test string
5 matches
1
9
2
.
1
6
8
.
1
.
1
­

1
2
7
.
0
.
0
.
1
­

0
.
0
.
0
.
0
­

2
5
5
.
2
5
5
.
2
5
5
.
2
5
5
­

2
5
6
.
2
5
6
.
2
5
6
.
2
5
6
­

9
9
9
.
9
9
9
.
9
9
9
.
9
9
9
­

1
.
2
.
3
­

1
.
2
.
3
.
4
space
enter
tab
Information
  • Clusters start from 0-255 25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]
  • Clusters are separated by dots
© lechihuy.dev made with