some feature versions are encoded as featureid.version, this strips those off, if they exist

def _strip_feature_version(featureid):
    """
    some feature versions are encoded as featureid.version, this strips those off, if they exist
    """
    version_detector = re.compile(r"(?P<featureid>.*)(?P<version>\.\d+)")
    match = version_detector.match(featureid)
    if match:
        return match.groupdict()["featureid"]
    else:
        return featureid