update the regular expression for hostname validity
Fixes TRAINVM-56