By the looks of it, that rule wouldn't match something like "a_bc", "ab_c", "a_b" or "a_b_c".
Try: /^[a-zA-Z0-9]+([_\s\-]?[a-zA-Z0-9])*$/
which matches the above cases but not any combination of spaces, dashes or underscores next to each other. Eg: "_-" or " _" are not allowed.