import re


def decode_range(s):
    """Decode a range string into a list of integers: 8-10,12,14 --> [8, 9, 10, 12, 14]
    """
    R = []
    for x in s.split(','):
        m = re.search(r'(\d+)-(\d+)', x)
        if m:
            i1 = int(m.group(1))
            i2 = int(m.group(2))
            R.extend(list(range(i1, i2 + 1)))
        elif x.isdigit():
            R.append(int(x))
        else:
            return None
    return R