Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
regular solution in Clear category for URL Normalization by Dima_Shul_chevskij
import re
def checkio(url):
url = url.lower()
url = re.sub('%([46][1-9a-f]|[57][0-9a]|3[0-9]|2d|2e|5f|7e)', lambda x: chr(int(x.group(1), 16)), url)
url = url.lower()
url = re.sub('%[1-9A-Za-z]{2}', lambda x: x.group().upper(), url)
url = re.sub(':80(?=/|$)', '', url)
url = re.sub(r'(/\.)(?=/)', '', url)
while re.match(r'.*/[^/.]*/\.\.(?=/|$)', url):
url = re.sub(r'/[^/.]*/\.\.(?=/|$)', '', url)
return url
March 8, 2018