Hi,

((\d+-\d+)|(\d+[+-]?)) should match one item r.

r(, *r)* should match a list of these items. Try:

Qt Code:
  1. QRegExp re("^((\\d+-\\d+)|(\\d+[+-]?))(, *((\\d+-\\d+)|(\\d+[+-]?)))*$");
To copy to clipboard, switch view to plain text mode 
HTH, Bernd