Created
October 31, 2025 20:38
-
-
Save Crinfarr/0f6758d7365c68785ee2824ba02fbc78 to your computer and use it in GitHub Desktop.
Regex that matches (EXACTLY!) any valid IPv4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (((2((5[0-5])|[0-4][0-9]))|(1[0-9][0-9])|([1-9][0-9])|([1-9]))\.)(((2((5[0-5])|[0-4][0-9]))|(1[0-9][0-9])|([1-9][0-9])|([0-9]))\.){2}((2((5[0-5])|[0-4][0-9]))|(1[0-9][0-9])|([1-9][0-9])|([1-9])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (((2((5[0-5])|[0-4]\d))|(1\d\d)|([1-9]\d)|([1-9]))\.)(((2((5[0-5])|[0-4]\d))|(1\d\d)|([1-9]\d)|(\d))\.){2}((2((5[0-5])|[0-4]\d))|(1\d\d)|([1-9]\d)|([1-9])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment