Last active
August 12, 2016 02:40
-
-
Save HokieGeek/94612805798b29e351a29ab0414098ab to your computer and use it in GitHub Desktop.
Want to remember to do this...
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
#!/bin/bash | |
IFS='-'; for v in $1; do | |
[[ $v =~ ^([0-9]{2}\.?){3}$ ]] && { echo $v; break; } | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment