import re


def splitVersion( version ):
    """
        Splits a version string in its individual tokens:
          * major version
          * minor version
          * patchlevel
          * extra tag
    """
    tmp = re.match( r"^(\d+)\.(\d+)\.*(\d*)\.*(.*)$", version )

    if tmp:
        return [ tmp.group(1), tmp.group(2), tmp.group(3), tmp.group(4) ]
    else:
        return [ None, None, None, None ]