def group_iterator(group):
ordered_chars = string.ascii_letters + string.digits<EOL>tokenizer = ('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>for m in re.finditer(tokenizer, group):<EOL><INDENT>if m.group('<STR_LIT>'):<EOL><INDENT>start, sep, end = m.group('<STR_LIT>')<EOL>for i in range(ordered_chars.index(start), ordered_chars.index(end) + <NUM_LIT:1>):<EOL><INDENT>yield ordered_chars[i]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield m.group('<STR_LIT>')<EOL><DEDENT><DEDENT>
Iterate over simple regex-like groups.

The only special character is a dash (-), which take the preceding and the following chars to
compute a range. If the range is non-sensical (e.g., b-a) it will be empty

Example:
>>> list(group_iterator('a-f'))
['a', 'b', 'c', 'd', 'e', 'f']
>>> list(group_iterator('148'))
['1', '4', '8']
>>> list(group_iterator('7-9ab'))
['7', '8', '9', 'a', 'b']
>>> list(group_iterator('0B-A1'))
['0', '1']