That's because, you have included the hyphen in the allowed characters in your character class. You should have it outside.
You can try something like this: -
^([0-9]+-)*[0-9]+$
Now this will match 0 or more repetition of some digits followed by a hyphen. Then one or more digits at the end.