import re


def _apply_regex(regex, full_version):
    """
    Applies a regular expression to the given full_version and tries to capture
    a group

    :param regex: the regular expression to apply
    :param full_version: the string that the regex will apply

    :return: None if the regex doesn't match or the result of the group
    """
    match_object = re.match(regex, full_version)

    if match_object and len(match_object.groups()) == 1:
        subversion = match_object.group(1)

    else:
        subversion = None

    return subversion