Detect the Domain Name

  • + 0 comments
    import re, sys
    
    regex = re.findall(r"(?:(http:\/\/|https:\/\/))(?:www\.)?([a-z0-9\-\.]+\.(org|com|in|tv|me|net))", sys.stdin.read())
    print(*sorted({m[1] for m in regex}), sep=';')