Security

IPv4 Address

Matches a valid IPv4 address

/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/

Type in the box above to test if your input matches the regex pattern.

Test Cases

192.168.1.1
127.0.0.1
256.256.256.256
1.2.3

Tags

#security #network #ip