refining regex to be more generic wrt hostname/ip.