def get_tag(tag):
    """
    Get the rule tag. Used by the search function that needs
    the revision number stripped from the tag id.
    
    :return: string representation of tag
    :rtype: str
    """
    if tag:
        try:
            tag, _version = tag.split('.')
            return tag
        except ValueError:
            pass