diff options
author | ptmcg <ptmcg@austin.rr.com> | 2023-01-18 05:04:15 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2023-01-18 05:04:15 -0600 |
commit | a29ec51c1eed55c90db61afcb937ab8beaf6f60c (patch) | |
tree | b243b17f7806c52969018e0af97f31437800d2c5 /pyparsing/common.py | |
parent | cc94b5a6d608e7f25be15c4487cbab25f606e0d8 (diff) | |
download | pyparsing-git-a29ec51c1eed55c90db61afcb937ab8beaf6f60c.tar.gz |
Remove ^ and $ tags from pp.common.url regex - fixes #459
Diffstat (limited to 'pyparsing/common.py')
-rw-r--r-- | pyparsing/common.py | 5 |
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 |