Fix #1277 by adding support for single-character domain names to regex.

Fixes #1277