mirror of https://github.com/explosion/spaCy.git
Make test for #957 reference correct bug. Add comment. Previous commit closes #957.
This commit is contained in:
parent
be204ed714
commit
83dca920d4
|
@ -1,5 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# The use of this module turns out to be important, to avoid pathological
|
||||
# back-tracking. See Issue #957
|
||||
import regex
|
||||
|
||||
# URL validation regex courtesy of: https://mathiasbynens.be/demo/url-regex
|
||||
|
@ -23,6 +25,8 @@ _URL_PATTERN = (
|
|||
# excludes reserved space >= 224.0.0.0
|
||||
# excludes network & broadcast addresses
|
||||
# (first & last IP address of each class)
|
||||
# MH: Do we really need this? Seems excessive, and seems to have caused
|
||||
# Issue #957
|
||||
r"(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])"
|
||||
r"(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}"
|
||||
r"(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))"
|
||||
|
|
Loading…
Reference in New Issue