Created
December 20, 2012 22:29
-
-
Save aaroncrespo/4349129 to your computer and use it in GitHub Desktop.
Simple Match IP's
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
| teststring.match(/(?<ip>(\d{1,3}\.){3}\d{1,3})/)[:ip] | |
| # detects strings that look like IPv4 ip's |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment