More lenient target name regex

Target names can have non-word characters but they can't have spaces.