'Returns the medium, medium index and subtrack index for a discogs
track position.'

def get_track_index(self, position):

    match = re.match('^(.*?)(\\d*?)((?<=\\w)\\.[\\w]+|(?<=\\d)[A-Z]+)?$', position.upper())
    if match:
        (medium, index, subindex) = match.groups()
        if (subindex and subindex.startswith('.')):
            subindex = subindex[1:]
    else:
        self._log.debug(u'Invalid    position:    {0}', position)
        medium = index = subindex = None
    return ((medium or None), (index or None), (subindex or None))
