-
-
Save rickhull/82780f59b77b92a9e06a 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
IP_REGEX = / | |
\A # starts with | |
\d+ # some digits, iface number | |
\:\s # colon literal followed by a space | |
(\S+) # some non-whitespace, iface name, $1 | |
\s+ # some spaces | |
inet\s # inet (v4) designation | |
([\d\.\/]+) # start IPv4/CIDR capture | |
/x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment