Created
August 21, 2014 15:39
-
-
Save yinheli/92b918acd5b765377dbe to your computer and use it in GitHub Desktop.
This file contains 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
if (/(10\.\d{1,3}\.\d{1,3}\.\d{1,3})|(172\.(1[6789]|2[0-9]|3[01])\.\d{1,3}\.\d{1,3})|(192\.168\.\d{1,3}\.\d{1,3})/.test(ipAddr)) { | |
// Successful match | |
} else { | |
// Match attempt failed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment