diff --git a/rfc3986/misc.py b/rfc3986/misc.py index dcf440d..6b4c202 100644 --- a/rfc3986/misc.py +++ b/rfc3986/misc.py @@ -7,3 +7,16 @@ GENERIC_DELIMITERS = (":", "/", "?", "#", "[", "]", "@") # Delimiters of subcomponents SUB_DELIMITERS = ("!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=") RESERVED_CHARS = general_delimiters + sub_delimiters + + +scheme_pattern = '\w[\w\d+-.]*' +authority_pattern = '[^/?#]+' +path_pattern = '.*' # FIXME +userinfo_pattern = '' + +expression = ('(?P{scheme}):(//(?P{authority})|' + '(?P{path}))').format({ + 'scheme': scheme_pattern, + 'authority': authority_pattern, + 'path': path_pattern, + })