This should do:
^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$
Explanation:
^ # Start of string
\d+ # Match a number.
(?:-\d+)? # Optionally match a dash and a number
(?: # Match the following group:
, # a comma
\d+ # and a number
(?:-\d+)? # (or a range, as above)
)* # any number of times, including zero.
$ # End of string