<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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