Wish you had given more *different* examples.
Non-consecutive dash or space, okay. But what about dash followed by space or vice versa?
And can the sequence begin or end with a dash or space??
Are any/all of those valid???
Anyway...assuming that *NONE* of those are legal:
You see it?
/^ === start
([a-z0-9]+[ \-])* === zero or more of
[a-z0-9]+ === one or more alphanums
[ \-] === followed by either space or dash
[a-z0-9]+ === ending with one or more alphanums
$ === end
/i === ignore case of alphas