You are viewing a single comment's thread. Return to all comments →
import re import sys domain_pattern = re.compile(r'https?://(?:www\.|ww2\.)?([a-zA-Z0-9\-]+\.[a-zA-Z0-9.\-]+)[^a-zA-Z0-9.\-]') input_stream = sys.stdin unique_domains = set() n = int(input_stream.readline().strip()) for _ in range(n): line = input_stream.readline().strip() for match in domain_pattern.findall(line): unique_domains.add(match) print(';'.join(sorted(unique_domains)))
Seems like cookies are disabled on this browser, please enable them to open this website
Detect the Domain Name
You are viewing a single comment's thread. Return to all comments →