Fix the regex so bad hostnames don't blow up

This came up on the first public delivery because someone used the name
of '$studentname-master'
Wouldn't ^classroom be required?