I3 - Expand ranges in a string

Given a string like:

1,2,4,6-9,12,15-17,20

expand the ranges, so the final string is:

1,2,4,6,7,8,9,12,15,16,17,20