I assume it's not necessarily only going to be 4 comma-separated parts, either.
Think about it: the field's value is a series of comma-separated terms. That means that it can either be this:
term
or this:
terms term
Where "terms" is a sequence of one or more of this:
term,
And each term is going to be either this:
number
or this:
number-number
And number is a sequence of one or more numerals. You can specify that in regexps with this: \d+
Good luck on your homework!
If this isn't your homework, then I'd suggest not using regexps. The reason for this is that the requirements you gave are not likely to be complete. For example, in a give range, you probably want the second number to be larger than the first. That requires a numerical value comparison check which is tough to do in regexps. So I'd suggest parsing the sequence and doing more with it.