summaryrefslogtreecommitdiff
path: root/pyparsing
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2023-01-18 05:04:15 -0600
committerptmcg <ptmcg@austin.rr.com>2023-01-18 05:04:15 -0600
commita29ec51c1eed55c90db61afcb937ab8beaf6f60c (patch)
treeb243b17f7806c52969018e0af97f31437800d2c5 /pyparsing
parentcc94b5a6d608e7f25be15c4487cbab25f606e0d8 (diff)
downloadpyparsing-git-a29ec51c1eed55c90db61afcb937ab8beaf6f60c.tar.gz
Remove ^ and $ tags from pp.common.url regex - fixes #459
Diffstat (limited to 'pyparsing')
-rw-r--r--pyparsing/common.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/pyparsing/common.py b/pyparsing/common.py
index bb8472a..90ac78e 100644
--- a/pyparsing/common.py
+++ b/pyparsing/common.py
@@ -363,7 +363,6 @@ class pyparsing_common:
url = Regex(
# https://mathiasbynens.be/demo/url-regex
# https://gist.github.com/dperini/729294
- r"^" +
# protocol identifier (optional)
# short syntax // still required
r"(?:(?:(?P<scheme>https?|ftp):)?\/\/)" +
@@ -404,9 +403,9 @@ class pyparsing_common:
# query string (optional)
r"(\?(?P<query>[^#]*))?" +
# fragment (optional)
- r"(#(?P<fragment>\S*))?" +
- r"$"
+ r"(#(?P<fragment>\S*))?"
).set_name("url")
+ """URL (http/https/ftp scheme)"""
# fmt: on
# pre-PEP8 compatibility names