do not run regex for empty host name since regex always fails in this case, the bug had been introduced in r2196