I need help with my regex to grab my host information from this logfile:
Tue Aug 24 10:22:14 2010: test1.colo_lvm:check:INFO: host=test1.dom.colo.name.com
Tue Aug 24 10:22:14 2010: test1.colo_lvm:check:INFO: "/home/bin64"/admin --user="foo-bar" --password="*****" --host="test1.dom.colo.name.com" --port="9999" --socket="/tmp" variables
My regex is also grabbing the 2nd line to include the hostname in double quotes and other pieces of data on that line, which I am not interested in. The first line is fine only. So, I'm just interested in
test1.dom.colo.name.com
and nothing else.
My regex so far is this:
if ($line =~ m/(host=)(.+)/){
Thanks!