#!/bin/bash
echo '192.168.1.1 foobar' | grep -E '([0-9]{1,3}\.?){4}' 
