adjust regexes and tests to allow single-character hostnames or domain components, like m.example.com
fixes #4