Change regex for regular name

Update the regular name regular expression to accept all of the
characters allowed in the RFC.

Closes #11
Change-Id: I92e7b9cb156d8dc8978c0dbf972ae3808b9913ba
This commit is contained in:
Viktor Haag
2015-05-05 13:12:52 -04:00
committed by Ian Cordasco
parent 2580624b2e
commit 459a40f1f5

View File

@@ -73,7 +73,11 @@ URI_MATCHER = re.compile(expression)
# Host patterns, see: http://tools.ietf.org/html/rfc3986#section-3.2.2
# The pattern for a regular name, e.g., www.google.com, api.github.com
reg_name = '[\w\d.]+'
reg_name = '(({0})*|[{1}]*)'.format(
'%[0-9A-Fa-f]{2}',
important_characters['re_sub_delimiters'] +
important_characters['re_unreserved']
)
# The pattern for an IPv4 address, e.g., 192.168.255.255, 127.0.0.1,
ipv4 = '(\d{1,3}.){3}\d{1,3}'
# Hexadecimal characters used in each piece of an IPv6 address