fix the host matching thing and make the regex sexier