import re


def looks_like_version(version):
    """Returns whether the string looks like a legitimate version number

    Example version strings:
        * 1.0.0-rc4
        * 1.0.0
    """
    pattern = re.compile(r'^([\w\-]+\.)?([\w\-]+\.)?([\w\-]+)$')
    return bool(pattern.match(version))