regex support to hostname lookup. Fixes #3