in reply to probelm with parsing regex
Use a character class containing both \w and "-":
/^host,\s*([\w-]+)/
Cheers, Sören