<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_exiobase12_version(filename):
 """ Returns the EXIOBASE version for the given filename, None if not found """

    try:
        ver_match = re.search(r'(\d+\w*(\.|\-|\_))*\d+\w*', filename)
        version = ver_match.string[ver_match.start():ver_match.end()]
        if re.search('\_\d\d\d\d', version[-5:]):
            version = version[:-5]
    except AttributeError:
        version = None

    return version