import re
URL_MATCH = re.compile(r"""
http[s]?:// # Match protocol, secure or not
(?:[a-zA-Z] # Match any letter
|[0-9] # Match any number
|[$-_@.&+] # Match other allowed symbols
|[!*\(\),] # Match exclamation, parens, commas
|(?:%[0-9a-fA-F][0-9a-fA-F]) # percent (%) sign followed by 2-digit hex
)+ # Match one or more of preceding tokens
""", re.VERBOSE)